Spaces:
Paused
Paused
max lines
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def process_results(results, highlight_terms):
|
|
75 |
|
76 |
def scisearch(query, language, num_results=10):
|
77 |
try:
|
78 |
-
query = query.
|
79 |
if query == "" or query is None:
|
80 |
return ""
|
81 |
|
@@ -184,7 +184,7 @@ if __name__ == "__main__":
|
|
184 |
with gr.Row():
|
185 |
gr.Markdown(value=description)
|
186 |
with gr.Row():
|
187 |
-
query = gr.Textbox(lines=
|
188 |
with gr.Row():
|
189 |
lang = gr.Dropdown(
|
190 |
choices=[
|
@@ -235,6 +235,7 @@ if __name__ == "__main__":
|
|
235 |
results: scisearch(query, lang, k),
|
236 |
flagging_form: gr.update(visible=True),
|
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 |
|
|
|
75 |
|
76 |
def scisearch(query, language, num_results=10):
|
77 |
try:
|
78 |
+
query = " ".join(query.split())
|
79 |
if query == "" or query is None:
|
80 |
return ""
|
81 |
|
|
|
184 |
with gr.Row():
|
185 |
gr.Markdown(value=description)
|
186 |
with gr.Row():
|
187 |
+
query = gr.Textbox(lines=1, max_lines=1, placeholder="Type your query here...", label="Query")
|
188 |
with gr.Row():
|
189 |
lang = gr.Dropdown(
|
190 |
choices=[
|
|
|
235 |
results: scisearch(query, lang, k),
|
236 |
flagging_form: gr.update(visible=True),
|
237 |
}
|
238 |
+
|
239 |
query.submit(fn=submit, inputs=[query, lang, k], outputs=[results, flagging_form])
|
240 |
submit_btn.click(submit, inputs=[query, lang, k], outputs=[results, flagging_form])
|
241 |
|