Spaces:
Runtime error
Runtime error
Commit ·
294e24f
1
Parent(s): f73e099
Upload app.py
Browse files
app.py
CHANGED
|
@@ -80,13 +80,13 @@ def fn(glycan, model):
|
|
| 80 |
pred = np.exp(pred)/sum(np.exp(pred)) # Softmax
|
| 81 |
pred = [float(x) for x in pred]
|
| 82 |
pred = {class_list[i]:pred[i] for i in range(15)}
|
| 83 |
-
return pred
|
| 84 |
|
| 85 |
|
| 86 |
demo = gr.Interface(
|
| 87 |
fn=fn,
|
| 88 |
inputs=[gr.Textbox(label="Glycan sequence"), gr.Radio(label="Model",choices=["No data augmentation", "Random node deletion", "Ensemble"])],
|
| 89 |
-
outputs=[gr.Label(num_top_classes=15, label="Prediction")
|
| 90 |
allow_flagging=False,
|
| 91 |
title="SweetNet demo",
|
| 92 |
examples=[["GlcOSN(a1-4)GlcA(b1-4)GlcOSN(a1-4)GlcAOS(b1-4)GlcOSN(a1-4)GlcOSN", "No data augmentation"],
|
|
|
|
| 80 |
pred = np.exp(pred)/sum(np.exp(pred)) # Softmax
|
| 81 |
pred = [float(x) for x in pred]
|
| 82 |
pred = {class_list[i]:pred[i] for i in range(15)}
|
| 83 |
+
return pred
|
| 84 |
|
| 85 |
|
| 86 |
demo = gr.Interface(
|
| 87 |
fn=fn,
|
| 88 |
inputs=[gr.Textbox(label="Glycan sequence"), gr.Radio(label="Model",choices=["No data augmentation", "Random node deletion", "Ensemble"])],
|
| 89 |
+
outputs=[gr.Label(num_top_classes=15, label="Prediction")],
|
| 90 |
allow_flagging=False,
|
| 91 |
title="SweetNet demo",
|
| 92 |
examples=[["GlcOSN(a1-4)GlcA(b1-4)GlcOSN(a1-4)GlcAOS(b1-4)GlcOSN(a1-4)GlcOSN", "No data augmentation"],
|