Spaces:
Running
Running
Commit
·
f8a3f83
1
Parent(s):
71f6b58
Update app.py
Browse files
app.py
CHANGED
@@ -112,6 +112,10 @@ def inference_sentence(text):
|
|
112 |
output = "This sentence will be processed:\n" + text
|
113 |
return output
|
114 |
|
|
|
|
|
|
|
|
|
115 |
def file(input_file, input_checks):
|
116 |
output = "output.txt"
|
117 |
f = open(output, 'w')
|
@@ -334,11 +338,12 @@ with gr.Blocks() as demo:
|
|
334 |
|
335 |
output_topics = gr.Textbox(label="Topics", visible=False)
|
336 |
|
337 |
-
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])
|
338 |
-
next_button_freq.click(fn=freq, inputs=[output_file,input_checks], outputs=[output_plot,next_button_dist,next_button_peaks,next_button_topics])
|
339 |
-
next_button_dist.click(fn=dist, inputs=[output_file,input_checks], outputs=[output_dist,next_button_peaks,next_button_topics])
|
340 |
-
next_button_peaks.click(fn=peaks, inputs=[output_file,input_checks], outputs=[output_peaks,next_button_topics])
|
341 |
-
next_button_topics.click(fn=topics, inputs=[output_file,input_checks], outputs=output_topics)
|
|
|
342 |
|
343 |
|
344 |
demo.launch()
|
|
|
112 |
output = "This sentence will be processed:\n" + text
|
113 |
return output
|
114 |
|
115 |
+
def unavailable(input_file, input_checks):
|
116 |
+
output = "Submitting your own data is currently unavailable, but you can try out the showcase mode 😊"
|
117 |
+
return gr.update(value=output, label="Oops!", visible=True)
|
118 |
+
|
119 |
def file(input_file, input_checks):
|
120 |
output = "output.txt"
|
121 |
f = open(output, 'w')
|
|
|
338 |
|
339 |
output_topics = gr.Textbox(label="Topics", visible=False)
|
340 |
|
341 |
+
#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])
|
342 |
+
#next_button_freq.click(fn=freq, inputs=[output_file,input_checks], outputs=[output_plot,next_button_dist,next_button_peaks,next_button_topics])
|
343 |
+
#next_button_dist.click(fn=dist, inputs=[output_file,input_checks], outputs=[output_dist,next_button_peaks,next_button_topics])
|
344 |
+
#next_button_peaks.click(fn=peaks, inputs=[output_file,input_checks], outputs=[output_peaks,next_button_topics])
|
345 |
+
#next_button_topics.click(fn=topics, inputs=[output_file,input_checks], outputs=output_topics)
|
346 |
+
send_btn.click(fn=unavailable, inputs=[input_file,input_checks], outputs=output_topics)
|
347 |
|
348 |
|
349 |
demo.launch()
|