Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -131,8 +131,13 @@ def my_inference_function(sec_txt):
|
|
131 |
|
132 |
mean = get_mean_from_proba(proba_list)
|
133 |
|
134 |
-
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
gradio_interface = gradio.Interface(
|
138 |
fn = my_inference_function,
|
|
|
131 |
|
132 |
mean = get_mean_from_proba(proba_list)
|
133 |
|
134 |
+
sentiment = torch.argmax(mean).item()
|
135 |
+
if sentiment == 0:
|
136 |
+
return 'Positive'
|
137 |
+
elif sentiment == 1:
|
138 |
+
return 'Negative'
|
139 |
+
else:
|
140 |
+
return 'Neutral'
|
141 |
|
142 |
gradio_interface = gradio.Interface(
|
143 |
fn = my_inference_function,
|