Spaces:
Running
Running
Commit
·
53b74c4
1
Parent(s):
f8a3f83
Update app.py
Browse files
app.py
CHANGED
@@ -324,26 +324,28 @@ with gr.Blocks() as demo:
|
|
324 |
send_btn = gr.Button("Submit data")
|
325 |
demo_btn = gr.Button("... or showcase with example data")
|
326 |
with gr.Column():
|
|
|
|
|
327 |
output_file = gr.File(label="Predictions", visible=False)
|
328 |
next_button_freq = gr.Button("Show emotion frequencies", visible=False)
|
329 |
|
330 |
-
output_plot = gr.Plot(
|
331 |
next_button_dist = gr.Button("Show emotion distribution over time", visible=False)
|
332 |
|
333 |
-
output_dist = gr.Plot(
|
334 |
next_button_peaks = gr.Button("Show peaks", visible=False)
|
335 |
|
336 |
-
output_peaks = gr.HTML(
|
337 |
next_button_topics = gr.Button("Show topics", visible=False)
|
338 |
|
339 |
-
output_topics = gr.Textbox(
|
340 |
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
send_btn.click(fn=unavailable, inputs=[input_file,input_checks], outputs=
|
347 |
|
348 |
|
349 |
demo.launch()
|
|
|
324 |
send_btn = gr.Button("Submit data")
|
325 |
demo_btn = gr.Button("... or showcase with example data")
|
326 |
with gr.Column():
|
327 |
+
message = gr.Textbox(label="Message", visible=False)
|
328 |
+
|
329 |
output_file = gr.File(label="Predictions", visible=False)
|
330 |
next_button_freq = gr.Button("Show emotion frequencies", visible=False)
|
331 |
|
332 |
+
output_plot = gr.Plot(show_label=False, visible=False).style(container=True)
|
333 |
next_button_dist = gr.Button("Show emotion distribution over time", visible=False)
|
334 |
|
335 |
+
output_dist = gr.Plot(show_label=False, visible=False)
|
336 |
next_button_peaks = gr.Button("Show peaks", visible=False)
|
337 |
|
338 |
+
output_peaks = gr.HTML(lvisible=False)
|
339 |
next_button_topics = gr.Button("Show topics", visible=False)
|
340 |
|
341 |
+
output_topics = gr.Textbox(show_label=False, visible=False)
|
342 |
|
343 |
+
send_btn.click(fn=file, inputs=[input_file,input_checks], outputs=[output_file,next_button_freq,next_button_dist,next_button_peaks,next_button_topics])
|
344 |
+
next_button_freq.click(fn=freq, inputs=[output_file,input_checks], outputs=[output_plot,next_button_dist,next_button_peaks,next_button_topics])
|
345 |
+
next_button_dist.click(fn=dist, inputs=[output_file,input_checks], outputs=[output_dist,next_button_peaks,next_button_topics])
|
346 |
+
next_button_peaks.click(fn=peaks, inputs=[output_file,input_checks], outputs=[output_peaks,next_button_topics])
|
347 |
+
next_button_topics.click(fn=topics, inputs=[output_file,input_checks], outputs=output_topics)
|
348 |
+
#send_btn.click(fn=unavailable, inputs=[input_file,input_checks], outputs=message)
|
349 |
|
350 |
|
351 |
demo.launch()
|