Update app.py
Browse files
app.py
CHANGED
@@ -55,13 +55,13 @@ def sentence_prediction(sentence):
|
|
55 |
|
56 |
outputs, [] = engine.predict_fn(test_data_loader, model, device)
|
57 |
print(outputs)
|
58 |
-
return outputs[0]
|
59 |
|
60 |
demo = gr.Interface(
|
61 |
fn=sentence_prediction,
|
62 |
inputs=gr.Textbox(placeholder="Enter a sentence here..."),
|
63 |
outputs="label",
|
64 |
-
interpretation="default",
|
65 |
examples=[["!"]])
|
66 |
|
67 |
demo.launch()
|
|
|
55 |
|
56 |
outputs, [] = engine.predict_fn(test_data_loader, model, device)
|
57 |
print(outputs)
|
58 |
+
return {"label":outputs[0]}
|
59 |
|
60 |
demo = gr.Interface(
|
61 |
fn=sentence_prediction,
|
62 |
inputs=gr.Textbox(placeholder="Enter a sentence here..."),
|
63 |
outputs="label",
|
64 |
+
# interpretation="default",
|
65 |
examples=[["!"]])
|
66 |
|
67 |
demo.launch()
|