Spaces:
Running
Running
more tabs
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def predict (Word, Sentence, modelname):
|
|
| 32 |
pred = pred.squeeze(0)
|
| 33 |
pred_list = pred.detach().numpy().tolist()
|
| 34 |
|
| 35 |
-
output = [labels[i]+'\t\t\t'+str(pred_list[i]) for i in range(len(labels)) if pred_list[i] > 0.0]
|
| 36 |
return "All Positive Predicted Values:\n"+"\n".join(output)
|
| 37 |
|
| 38 |
demo = gr.Interface(
|
|
@@ -45,7 +45,7 @@ demo = gr.Interface(
|
|
| 45 |
outputs=["text"],
|
| 46 |
)
|
| 47 |
|
| 48 |
-
demo.launch(
|
| 49 |
|
| 50 |
if __name__ == "__main__":
|
| 51 |
-
demo.launch(
|
|
|
|
| 32 |
pred = pred.squeeze(0)
|
| 33 |
pred_list = pred.detach().numpy().tolist()
|
| 34 |
|
| 35 |
+
output = [labels[i]+'\t\t\t\t\t\t\t'+str(pred_list[i]) for i in range(len(labels)) if pred_list[i] > 0.0]
|
| 36 |
return "All Positive Predicted Values:\n"+"\n".join(output)
|
| 37 |
|
| 38 |
demo = gr.Interface(
|
|
|
|
| 45 |
outputs=["text"],
|
| 46 |
)
|
| 47 |
|
| 48 |
+
demo.launch()
|
| 49 |
|
| 50 |
if __name__ == "__main__":
|
| 51 |
+
demo.launch()
|