Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,8 @@ def evaluate(text) :
|
|
37 |
|
38 |
with torch.no_grad() :
|
39 |
result = np.round(result.numpy(), 2)
|
40 |
-
|
|
|
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",)
|