Spaces:
Running
on
Zero
Running
on
Zero
Test Gradio app without model descriptions
Browse files
app.py
CHANGED
@@ -58,40 +58,9 @@ def classify(sequence):
|
|
58 |
return "Potential Allergen" if pred.item() == 1 else "Non-Allergen"
|
59 |
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
**🧬 Input Format – FASTA Sequences**
|
65 |
-
This tool accepts protein sequences in FASTA format
|
66 |
-
|
67 |
-
**🧾 Output Explanation**
|
68 |
-
|
69 |
-
AllerTrans classifies your input sequence into one of the following categories:
|
70 |
-
|
71 |
-
🟢 Non-Allergen:
|
72 |
-
The protein is unlikely to cause an allergic reaction and can be considered safe in terms of allergenicity.
|
73 |
-
|
74 |
-
🔴 Potential Allergen:
|
75 |
-
The protein has the potential to trigger an allergic response or exhibit cross-reactivity in certain individuals. While not all individuals may experience reactions, these proteins cannot be considered safe.
|
76 |
-
|
77 |
-
**💡 Accepted Proteins**
|
78 |
-
- Natural and also recombinant proteins
|
79 |
-
|
80 |
-
🔎 **Note of Caution**:
|
81 |
-
While our model demonstrates promising performance—particularly with recombinant proteins, as evidenced by our additional evaluation with a recombinant protein dataset
|
82 |
-
from UniProt—**we advise caution when generalizing the results to all constructs and modifications of recombinant protein**. The generizability of the model to various recombinant scenarios has not been fully explored.
|
83 |
-
|
84 |
-
**⚠️ Disclaimer**
|
85 |
-
Although AllerTrans provides highly accurate predictions, it is intended as a screening tool. For clinical or regulatory decisions, always confirm results with experimental validation.
|
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()
|
|
|
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()
|