Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,7 @@ def infer_and_log(text_input):
|
|
109 |
return formatted_output, word_probs
|
110 |
|
111 |
def clear_fields():
|
112 |
-
return "", ""
|
113 |
setup_hf_dataset()
|
114 |
|
115 |
with gr.Blocks() as app:
|
@@ -123,7 +123,7 @@ with gr.Blocks() as app:
|
|
123 |
submit_btn = gr.Button("Submit")
|
124 |
clear_btn = gr.Button("Clear")
|
125 |
submit_btn.click(fn=infer_and_log, inputs=input_box, outputs=[output_html, output_json])
|
126 |
-
clear_btn.click(fn=clear_fields, outputs=[input_box,
|
127 |
|
128 |
if __name__ == "__main__":
|
129 |
app.launch()
|
|
|
109 |
return formatted_output, word_probs
|
110 |
|
111 |
def clear_fields():
|
112 |
+
return "", "", ""
|
113 |
setup_hf_dataset()
|
114 |
|
115 |
with gr.Blocks() as app:
|
|
|
123 |
submit_btn = gr.Button("Submit")
|
124 |
clear_btn = gr.Button("Clear")
|
125 |
submit_btn.click(fn=infer_and_log, inputs=input_box, outputs=[output_html, output_json])
|
126 |
+
clear_btn.click(fn=clear_fields, outputs=[input_box, output_html, output_json])
|
127 |
|
128 |
if __name__ == "__main__":
|
129 |
app.launch()
|