thak123 commited on
Commit
adc3723
1 Parent(s): 3e1334e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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()