Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -36,9 +36,8 @@ def count_nans(row):
|
|
36 |
|
37 |
gemini_api_key = os.getenv("GEMINI_API_KEY")
|
38 |
hf_token = os.getenv("HF_TOKEN")
|
39 |
-
|
40 |
-
|
41 |
-
request_arxiv_repo_id="chansung/requested-arxiv-ids-3"
|
42 |
|
43 |
ds = datasets.load_dataset(dataset_repo_id)
|
44 |
request_ds = datasets.load_dataset(request_arxiv_repo_id)
|
@@ -387,29 +386,9 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
387 |
with gr.Column(elem_id="control-panel", elem_classes=["group"]):
|
388 |
with gr.Column():
|
389 |
with gr.Row():
|
390 |
-
year_dd = gr.Dropdown(
|
391 |
-
|
392 |
-
|
393 |
-
label="Year",
|
394 |
-
interactive=True,
|
395 |
-
filterable=False
|
396 |
-
)
|
397 |
-
|
398 |
-
month_dd = gr.Dropdown(
|
399 |
-
sorted_month,
|
400 |
-
value=last_month,
|
401 |
-
label="Month",
|
402 |
-
interactive=True,
|
403 |
-
filterable=False
|
404 |
-
)
|
405 |
-
|
406 |
-
day_dd = gr.Dropdown(
|
407 |
-
sorted_day,
|
408 |
-
value=last_day,
|
409 |
-
label="Day",
|
410 |
-
interactive=True,
|
411 |
-
filterable=False
|
412 |
-
)
|
413 |
|
414 |
papers_dd = gr.Dropdown(
|
415 |
list(set([paper["title"] for paper in last_papers])),
|
@@ -444,6 +423,7 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
444 |
hf_paper_link = gr.Markdown(
|
445 |
"[![Paper page](https://huggingface.co/datasets/huggingface/badges/resolve/main/paper-page-md.svg)](https://huggingface.co/papers/%s)" % selected_paper['arxiv_id']
|
446 |
)
|
|
|
447 |
|
448 |
summary = gr.Markdown(f"{selected_paper['summary']}", elem_classes=["small-font"])
|
449 |
|
|
|
36 |
|
37 |
gemini_api_key = os.getenv("GEMINI_API_KEY")
|
38 |
hf_token = os.getenv("HF_TOKEN")
|
39 |
+
dataset_repo_id = os.getenv("SOURCE_DATA_REPO_ID") # "chansung/auto-paper-qa2"
|
40 |
+
request_arxiv_repo_id = os.getenv("REQUEST_DATA_REPO_ID") # "chansung/requested-arxiv-ids-3"
|
|
|
41 |
|
42 |
ds = datasets.load_dataset(dataset_repo_id)
|
43 |
request_ds = datasets.load_dataset(request_arxiv_repo_id)
|
|
|
386 |
with gr.Column(elem_id="control-panel", elem_classes=["group"]):
|
387 |
with gr.Column():
|
388 |
with gr.Row():
|
389 |
+
year_dd = gr.Dropdown(sorted_year, value=last_year, label="Year", interactive=True, filterable=False)
|
390 |
+
month_dd = gr.Dropdown(sorted_month, value=last_month, label="Month", interactive=True, filterable=False)
|
391 |
+
day_dd = gr.Dropdown(sorted_day, value=last_day, label="Day", interactive=True, filterable=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
|
393 |
papers_dd = gr.Dropdown(
|
394 |
list(set([paper["title"] for paper in last_papers])),
|
|
|
423 |
hf_paper_link = gr.Markdown(
|
424 |
"[![Paper page](https://huggingface.co/datasets/huggingface/badges/resolve/main/paper-page-md.svg)](https://huggingface.co/papers/%s)" % selected_paper['arxiv_id']
|
425 |
)
|
426 |
+
gr.Button("Chat about the paper", interactive=False)
|
427 |
|
428 |
summary = gr.Markdown(f"{selected_paper['summary']}", elem_classes=["small-font"])
|
429 |
|