Spaces:
Running
Running
Commit
·
2694055
1
Parent(s):
6e432b1
Update app.py
Browse files
app.py
CHANGED
@@ -61,17 +61,21 @@ def inference_dataset(file_object, option_list):
|
|
61 |
for line in predictions_content:
|
62 |
f.write(str(line[0]) + '\t' + str(line[1]) + '\t' + str(line[2]) + '\n')
|
63 |
f.close()
|
|
|
64 |
output1 = output
|
|
|
65 |
output3 = output4 = output5 = "This option was not selected."
|
66 |
if "emotion frequencies" in option_list:
|
67 |
output2 = frequencies(preds)
|
|
|
68 |
if "emotion distribution over time" in option_list:
|
69 |
output3 = "This option was selected."
|
70 |
if "peaks" in option_list:
|
71 |
output4 = "This option was selected."
|
72 |
if "topics" in option_list:
|
73 |
output5 = "This option was selected."
|
74 |
-
return [output1, output2, output3, output4, output5]
|
|
|
75 |
|
76 |
iface_sentence = gr.Interface(
|
77 |
fn=inference_sentence,
|
|
|
61 |
for line in predictions_content:
|
62 |
f.write(str(line[0]) + '\t' + str(line[1]) + '\t' + str(line[2]) + '\n')
|
63 |
f.close()
|
64 |
+
output_list = []
|
65 |
output1 = output
|
66 |
+
output_list.append(output1)
|
67 |
output3 = output4 = output5 = "This option was not selected."
|
68 |
if "emotion frequencies" in option_list:
|
69 |
output2 = frequencies(preds)
|
70 |
+
output_list.append(output2)
|
71 |
if "emotion distribution over time" in option_list:
|
72 |
output3 = "This option was selected."
|
73 |
if "peaks" in option_list:
|
74 |
output4 = "This option was selected."
|
75 |
if "topics" in option_list:
|
76 |
output5 = "This option was selected."
|
77 |
+
#return [output1, output2, output3, output4, output5]
|
78 |
+
return output_list
|
79 |
|
80 |
iface_sentence = gr.Interface(
|
81 |
fn=inference_sentence,
|