Spaces:
Runtime error
Runtime error
fixed app.py issues
Browse files
app.py
CHANGED
|
@@ -89,16 +89,18 @@ def fn_two(choice, docs, n_pairs):
|
|
| 89 |
|
| 90 |
with gr.Blocks() as demo:
|
| 91 |
with gr.Row():
|
| 92 |
-
paper_name = gr.Textbox(label="Enter Paper Name/ID")
|
| 93 |
-
n_docs = gr.Dropdown(label="Number of Docs to Load", [1,2,3,4,5,6,7,8,9,10])
|
| 94 |
docs = gr.State() #gr.Textbox(label="second", visible=False)
|
| 95 |
n_pairs = gr.State() #gr.Textbox(label="third", visible=False)
|
| 96 |
fetch_btn = gr.Button("Fetch")
|
| 97 |
-
with gr.Row():
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
result = gr.Textbox(label="Summary", visible=True)
|
|
|
|
|
|
|
| 102 |
|
| 103 |
fetch_btn.click(fn=fn_one, inputs=[paper_name, n_docs],
|
| 104 |
outputs=[choice, docs, n_pairs],
|
|
|
|
| 89 |
|
| 90 |
with gr.Blocks() as demo:
|
| 91 |
with gr.Row():
|
| 92 |
+
paper_name = gr.Textbox(label="Enter Paper Name/ID*")
|
| 93 |
+
n_docs = gr.Dropdown(label="Number of Docs to Load", choices = [1,2,3,4,5,6,7,8,9,10])
|
| 94 |
docs = gr.State() #gr.Textbox(label="second", visible=False)
|
| 95 |
n_pairs = gr.State() #gr.Textbox(label="third", visible=False)
|
| 96 |
fetch_btn = gr.Button("Fetch")
|
| 97 |
+
#with gr.Row():
|
| 98 |
+
label = "Papers for " + str(paper_name)
|
| 99 |
+
choice = gr.Dropdown(label = label, interactive=True)
|
| 100 |
+
submit_btn = gr.Button('Fetch & Summarize')
|
| 101 |
result = gr.Textbox(label="Summary", visible=True)
|
| 102 |
+
gr.Textbox(label = "Disclaimer", value="* - Please Use Paper ID (Example : 2301.10172) as it will give accurate results. Free text search can give errors sometimes While using Paper ID no need to change Number of Documents to load",
|
| 103 |
+
interactive=False)
|
| 104 |
|
| 105 |
fetch_btn.click(fn=fn_one, inputs=[paper_name, n_docs],
|
| 106 |
outputs=[choice, docs, n_pairs],
|