Spaces:
Running
on
Zero
Running
on
Zero
Fix Gradio render issue
Browse files
app.py
CHANGED
@@ -58,15 +58,6 @@ def classify(sequence):
|
|
58 |
return "Potential Allergen" if pred.item() == 1 else "Non-Allergen"
|
59 |
|
60 |
|
61 |
-
# demo = gr.Interface(fn=classify,
|
62 |
-
# inputs=gr.Textbox(lines=3, placeholder="Enter protein sequence..."),
|
63 |
-
# outputs=gr.Label(label="Prediction"))
|
64 |
-
|
65 |
-
# if __name__ == "__main__":
|
66 |
-
# demo.launch()
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
description_md = """
|
71 |
### π **About AllerTrans β An Allergenicity Prediction Tool for Protein Sequences**
|
72 |
|
@@ -95,13 +86,12 @@ Although AllerTrans provides highly accurate predictions, it is intended as a sc
|
|
95 |
"""
|
96 |
|
97 |
with gr.Blocks() as demo:
|
98 |
-
|
99 |
fn=classify,
|
100 |
inputs=gr.Textbox(lines=3, placeholder="Enter protein sequence..."),
|
101 |
outputs=gr.Label(label="Prediction"),
|
102 |
)
|
103 |
-
interface.render()
|
104 |
gr.Markdown(description_md)
|
105 |
|
106 |
if __name__ == "__main__":
|
107 |
-
demo.launch()
|
|
|
58 |
return "Potential Allergen" if pred.item() == 1 else "Non-Allergen"
|
59 |
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
description_md = """
|
62 |
### π **About AllerTrans β An Allergenicity Prediction Tool for Protein Sequences**
|
63 |
|
|
|
86 |
"""
|
87 |
|
88 |
with gr.Blocks() as demo:
|
89 |
+
gr.Interface(
|
90 |
fn=classify,
|
91 |
inputs=gr.Textbox(lines=3, placeholder="Enter protein sequence..."),
|
92 |
outputs=gr.Label(label="Prediction"),
|
93 |
)
|
|
|
94 |
gr.Markdown(description_md)
|
95 |
|
96 |
if __name__ == "__main__":
|
97 |
+
demo.launch()
|