Update app.py
Browse files
app.py
CHANGED
@@ -74,10 +74,10 @@ def summarize_paper_and_save_to_sheet(paper_id):
|
|
74 |
paper_url = f"https://arxiv.org/pdf/{paper_id}.pdf"
|
75 |
pdf_path = download_paper(paper_url)
|
76 |
text = extract_text_from_pdf(pdf_path)
|
77 |
-
summary = summarize_text_with_chat(text)
|
78 |
os.remove(pdf_path)
|
79 |
-
|
80 |
-
return summary
|
81 |
|
82 |
def gradio_interface():
|
83 |
paper_links = fetch_paper_links("https://huggingface.co/papers")
|
|
|
74 |
paper_url = f"https://arxiv.org/pdf/{paper_id}.pdf"
|
75 |
pdf_path = download_paper(paper_url)
|
76 |
text = extract_text_from_pdf(pdf_path)
|
77 |
+
summary, token = summarize_text_with_chat(text)
|
78 |
os.remove(pdf_path)
|
79 |
+
worksheet.append_row([paper_id, paper_url, summary, token])
|
80 |
+
return summary, token
|
81 |
|
82 |
def gradio_interface():
|
83 |
paper_links = fetch_paper_links("https://huggingface.co/papers")
|