Spaces:
Paused
Paused
fix defaults
Browse files
app.py
CHANGED
@@ -180,7 +180,7 @@ if __name__ == "__main__":
|
|
180 |
css=".underline-on-hover:hover { text-decoration: underline; } .flagging { font-size:12px; color:Silver; }"
|
181 |
)
|
182 |
|
183 |
-
def submit(query, lang
|
184 |
if query == "":
|
185 |
raise ValueError("Invalid query provided")
|
186 |
return {
|
@@ -193,7 +193,6 @@ if __name__ == "__main__":
|
|
193 |
gr.Markdown(value=description)
|
194 |
with gr.Row():
|
195 |
query = gr.Textbox(lines=2, placeholder="Type your query here...", label="Query")
|
196 |
-
query.submit(fn=submit)
|
197 |
with gr.Row():
|
198 |
lang = gr.Dropdown(
|
199 |
choices=[
|
@@ -236,6 +235,7 @@ if __name__ == "__main__":
|
|
236 |
flag_btn = gr.Button("Flag Results")
|
237 |
flag_btn.click(flag, inputs=[query, lang, k, flag_txt], outputs=[flag_txt])
|
238 |
|
|
|
239 |
submit_btn.click(submit, inputs=[query, lang, k], outputs=[results, flagging_form])
|
240 |
|
241 |
demo.launch(enable_queue=True, debug=True)
|
|
|
180 |
css=".underline-on-hover:hover { text-decoration: underline; } .flagging { font-size:12px; color:Silver; }"
|
181 |
)
|
182 |
|
183 |
+
def submit(query, lang, k):
|
184 |
if query == "":
|
185 |
raise ValueError("Invalid query provided")
|
186 |
return {
|
|
|
193 |
gr.Markdown(value=description)
|
194 |
with gr.Row():
|
195 |
query = gr.Textbox(lines=2, placeholder="Type your query here...", label="Query")
|
|
|
196 |
with gr.Row():
|
197 |
lang = gr.Dropdown(
|
198 |
choices=[
|
|
|
235 |
flag_btn = gr.Button("Flag Results")
|
236 |
flag_btn.click(flag, inputs=[query, lang, k, flag_txt], outputs=[flag_txt])
|
237 |
|
238 |
+
query.submit(fn=submit, inputs=[query, lang, k], outputs=[results, flagging_form])
|
239 |
submit_btn.click(submit, inputs=[query, lang, k], outputs=[results, flagging_form])
|
240 |
|
241 |
demo.launch(enable_queue=True, debug=True)
|