Spaces:
Running
Running
Commit
·
2c4f796
1
Parent(s):
db8107b
Update app.py
Browse files
app.py
CHANGED
@@ -341,7 +341,7 @@ def peaks(output_file, input_checks):
|
|
341 |
'</body>'
|
342 |
'</html>'
|
343 |
)
|
344 |
-
if "topics" in input_checks:
|
345 |
return gr.update(value=html, visible=True), gr.update(visible=True) # next_button_topics becomes available
|
346 |
else:
|
347 |
return gr.update(value=html, visible=True), gr.update(visible=False) # no next_button becomes available
|
@@ -395,12 +395,12 @@ with gr.Blocks() as demo:
|
|
395 |
|
396 |
output_topics = gr.Textbox(show_label=False, visible=False)
|
397 |
|
398 |
-
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])
|
399 |
next_button_freq.click(fn=freq, inputs=[output_file,input_checks], outputs=[output_plot,next_button_dist,next_button_peaks,next_button_topics])
|
400 |
next_button_dist.click(fn=dist, inputs=[output_file,input_checks], outputs=[output_dist,next_button_peaks,next_button_topics])
|
401 |
next_button_peaks.click(fn=peaks, inputs=[output_file,input_checks], outputs=[output_peaks,next_button_topics])
|
402 |
next_button_topics.click(fn=topics, inputs=[output_file,input_checks], outputs=output_topics)
|
403 |
-
|
404 |
demo_btn.click(fn=showcase, inputs=[input_file], outputs=[output_file,next_button_freq,next_button_dist,next_button_peaks,next_button_topics])
|
405 |
|
406 |
|
|
|
341 |
'</body>'
|
342 |
'</html>'
|
343 |
)
|
344 |
+
if "topics" in input_checks or (output_file.name).startswith('/tmp/data'):
|
345 |
return gr.update(value=html, visible=True), gr.update(visible=True) # next_button_topics becomes available
|
346 |
else:
|
347 |
return gr.update(value=html, visible=True), gr.update(visible=False) # no next_button becomes available
|
|
|
395 |
|
396 |
output_topics = gr.Textbox(show_label=False, visible=False)
|
397 |
|
398 |
+
#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])
|
399 |
next_button_freq.click(fn=freq, inputs=[output_file,input_checks], outputs=[output_plot,next_button_dist,next_button_peaks,next_button_topics])
|
400 |
next_button_dist.click(fn=dist, inputs=[output_file,input_checks], outputs=[output_dist,next_button_peaks,next_button_topics])
|
401 |
next_button_peaks.click(fn=peaks, inputs=[output_file,input_checks], outputs=[output_peaks,next_button_topics])
|
402 |
next_button_topics.click(fn=topics, inputs=[output_file,input_checks], outputs=output_topics)
|
403 |
+
send_btn.click(fn=unavailable, inputs=[input_file,input_checks], outputs=message)
|
404 |
demo_btn.click(fn=showcase, inputs=[input_file], outputs=[output_file,next_button_freq,next_button_dist,next_button_peaks,next_button_topics])
|
405 |
|
406 |
|