Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ elif pdf_source == "Enter a PDF URL":
|
|
57 |
pdf_url = st.text_input("Enter PDF URL:", value="https://arxiv.org/pdf/2406.06998", key="pdf_url", on_change=lambda: st.session_state.update(trigger_download=True))
|
58 |
|
59 |
# Button OR Enter key will trigger download
|
60 |
-
if st.button("Download
|
61 |
with st.spinner("Downloading PDF..."):
|
62 |
try:
|
63 |
response = requests.get(pdf_url)
|
|
|
57 |
pdf_url = st.text_input("Enter PDF URL:", value="https://arxiv.org/pdf/2406.06998", key="pdf_url", on_change=lambda: st.session_state.update(trigger_download=True))
|
58 |
|
59 |
# Button OR Enter key will trigger download
|
60 |
+
if st.button("Download & Process PDF") or st.session_state.get("trigger_download", False):
|
61 |
with st.spinner("Downloading PDF..."):
|
62 |
try:
|
63 |
response = requests.get(pdf_url)
|