Spaces:
Running
Running
Commit
·
da1cbbc
1
Parent(s):
b2a109a
Update app.py
Browse files
app.py
CHANGED
@@ -356,8 +356,9 @@ def peaks(output_file, input_checks):
|
|
356 |
return gr.update(value=html, visible=True), gr.update(visible=False) # no next_button becomes available
|
357 |
|
358 |
def topics(output_file, input_checks):
|
359 |
-
|
360 |
-
|
|
|
361 |
|
362 |
with gr.Blocks() as demo:
|
363 |
with gr.Tab("Sentence"):
|
@@ -402,7 +403,7 @@ with gr.Blocks() as demo:
|
|
402 |
output_peaks = gr.HTML(visible=False)
|
403 |
next_button_topics = gr.Button("Show topics", visible=False)
|
404 |
|
405 |
-
output_topics = gr.
|
406 |
|
407 |
#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])
|
408 |
next_button_freq.click(fn=freq, inputs=[output_file,input_checks], outputs=[output_plot,next_button_dist,next_button_peaks,next_button_topics])
|
|
|
356 |
return gr.update(value=html, visible=True), gr.update(visible=False) # no next_button becomes available
|
357 |
|
358 |
def topics(output_file, input_checks):
|
359 |
+
plot = pickle.load(open('vis_classes_covid.p', 'rb'))
|
360 |
+
plot.update_layout(width=600, height=400)
|
361 |
+
return gr.Plot.update(value=plot, visible=True) # no next_button becomes available
|
362 |
|
363 |
with gr.Blocks() as demo:
|
364 |
with gr.Tab("Sentence"):
|
|
|
403 |
output_peaks = gr.HTML(visible=False)
|
404 |
next_button_topics = gr.Button("Show topics", visible=False)
|
405 |
|
406 |
+
output_topics = gr.Plot(show_label=False, visible=False)
|
407 |
|
408 |
#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])
|
409 |
next_button_freq.click(fn=freq, inputs=[output_file,input_checks], outputs=[output_plot,next_button_dist,next_button_peaks,next_button_topics])
|