joonkim commited on
Commit
a6f9228
β€’
1 Parent(s): c9d5b96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -37,7 +37,8 @@ def evaluate(text) :
37
 
38
  with torch.no_grad() :
39
  result = np.round(result.numpy(), 2)
40
- return {'Liberal': result[0, 0], 'Conservative': result[0, 1]}
 
41
 
42
  iface = gr.Interface(fn=evaluate, inputs="text", outputs=gr.outputs.Label(num_top_classes=2),
43
  title="Political Sentiment Analysis Using BERT",)
 
37
 
38
  with torch.no_grad() :
39
  result = np.round(result.numpy(), 2)
40
+ print(result)
41
+ return {'Liberal': result[0][0], 'Conservative': result[0][1]}
42
 
43
  iface = gr.Interface(fn=evaluate, inputs="text", outputs=gr.outputs.Label(num_top_classes=2),
44
  title="Political Sentiment Analysis Using BERT",)