lunadebruyne commited on
Commit
3b63119
·
1 Parent(s): 3897cbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -4
app.py CHANGED
@@ -110,8 +110,17 @@ def inference_sentence(text):
110
  return output
111
 
112
  def inference_dataset(input):
113
- output = "Here comes the output."
114
- return output
 
 
 
 
 
 
 
 
 
115
 
116
 
117
  """
@@ -155,8 +164,14 @@ with gr.Blocks() as demo:
155
  ["emotion frequencies", "emotion distribution over time", "peaks", "topics"],
156
  label = "Select options")
157
  send_btn = gr.Button("Send")
158
- output = gr.Textbox()
159
- send_btn.click(fn=inference_sentence, inputs={input_file,input_checks}, outputs=output)
 
 
 
 
 
 
160
 
161
  demo.launch()
162
 
 
110
  return output
111
 
112
  def inference_dataset(input):
113
+ output1="Here you will be able to download a file."
114
+ output2 = output3 = output4 = output5 = "This option was not selected."
115
+ if "emotion frequencies" in option_list:
116
+ output2 = "This option was selected."
117
+ if "emotion distribution over time" in option_list:
118
+ output3 = "This option was selected."
119
+ if "peaks" in option_list:
120
+ output4 = "This option was selected."
121
+ if "topics" in option_list:
122
+ output5 = "This option was selected."
123
+ return output1,output2,output3,output4,output5
124
 
125
 
126
  """
 
164
  ["emotion frequencies", "emotion distribution over time", "peaks", "topics"],
165
  label = "Select options")
166
  send_btn = gr.Button("Send")
167
+ with gr.Column():
168
+ output_file = gr.Textbox()
169
+ output_plot = gr.Textbox()
170
+ output_dist = gr.Textbox()
171
+ output_peaks = gr.Textbox()
172
+ output_topics = gr.Textbox()
173
+
174
+ send_btn.click(fn=inference_sentence, inputs={input_file,input_checks}, outputs=[output_file,output_plot,output_dist,output_peaks,output_topics])
175
 
176
  demo.launch()
177