Update app.py
Browse files
app.py
CHANGED
@@ -1,28 +1,28 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from fetch_data import fetch_data
|
3 |
-
from tools import reset_datafiles
|
4 |
-
|
5 |
-
theme = gr.themes.Soft(
|
6 |
-
primary_hue="purple",
|
7 |
-
secondary_hue="cyan",
|
8 |
-
neutral_hue="slate",
|
9 |
-
font=[
|
10 |
-
gr.themes.GoogleFont('Syne'),
|
11 |
-
gr.themes.GoogleFont('Poppins'),
|
12 |
-
gr.themes.GoogleFont('Poppins'),
|
13 |
-
gr.themes.GoogleFont('Poppins')
|
14 |
-
],
|
15 |
-
)
|
16 |
-
|
17 |
-
with gr.Blocks(theme=theme, title="Fetch Research Paper IDS") as app:
|
18 |
-
with gr.Row():
|
19 |
-
with gr.Column():
|
20 |
-
user_access_key = gr.Textbox(label="Access Key", placeholder="Enter your access key", type="password")
|
21 |
-
with gr.Row():
|
22 |
-
fetch_data_btn = gr.Button(value="Fetch Data")
|
23 |
-
reset_files = gr.Button(value="Reset Files")
|
24 |
-
raw_data = gr.Textbox(lines=15, label="Raw IDs Data", interactive=False, placeholder="IDs starting with PMC are PMC IDs and rest all are Arxiv IDs", show_copy_button=True)
|
25 |
-
fetch_data_btn.click(fn=fetch_data, inputs=[user_access_key], outputs=[raw_data], api_name="fetch_paper_ids")
|
26 |
-
reset_files.click(fn=reset_datafiles, inputs=[user_access_key], outputs=[raw_data], show_api=False)
|
27 |
-
|
28 |
-
app.queue(default_concurrency_limit=25).launch(
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from fetch_data import fetch_data
|
3 |
+
from tools import reset_datafiles
|
4 |
+
|
5 |
+
theme = gr.themes.Soft(
|
6 |
+
primary_hue="purple",
|
7 |
+
secondary_hue="cyan",
|
8 |
+
neutral_hue="slate",
|
9 |
+
font=[
|
10 |
+
gr.themes.GoogleFont('Syne'),
|
11 |
+
gr.themes.GoogleFont('Poppins'),
|
12 |
+
gr.themes.GoogleFont('Poppins'),
|
13 |
+
gr.themes.GoogleFont('Poppins')
|
14 |
+
],
|
15 |
+
)
|
16 |
+
|
17 |
+
with gr.Blocks(theme=theme, title="Fetch Research Paper IDS") as app:
|
18 |
+
with gr.Row():
|
19 |
+
with gr.Column():
|
20 |
+
user_access_key = gr.Textbox(label="Access Key", placeholder="Enter your access key", type="password")
|
21 |
+
with gr.Row():
|
22 |
+
fetch_data_btn = gr.Button(value="Fetch Data")
|
23 |
+
reset_files = gr.Button(value="Reset Files")
|
24 |
+
raw_data = gr.Textbox(lines=15, label="Raw IDs Data", interactive=False, placeholder="IDs starting with PMC are PMC IDs and rest all are Arxiv IDs", show_copy_button=True)
|
25 |
+
fetch_data_btn.click(fn=fetch_data, inputs=[user_access_key], outputs=[raw_data], api_name="fetch_paper_ids")
|
26 |
+
reset_files.click(fn=reset_datafiles, inputs=[user_access_key], outputs=[raw_data], show_api=False)
|
27 |
+
|
28 |
+
app.queue(default_concurrency_limit=25).launch(show_api=True, ssr_mode=False)
|