Spaces:
Sleeping
Sleeping
Update streamlit-pdf-viewer and enable text rendering
Browse files- requirements.txt +1 -1
- streamlit_app.py +1 -6
requirements.txt
CHANGED
@@ -24,6 +24,6 @@ typing-inspect==0.9.0
|
|
24 |
typing_extensions==4.11.0
|
25 |
pydantic==2.6.4
|
26 |
sentence_transformers==2.6.1
|
27 |
-
streamlit-pdf-viewer
|
28 |
umap-learn
|
29 |
plotly
|
|
|
24 |
typing_extensions==4.11.0
|
25 |
pydantic==2.6.4
|
26 |
sentence_transformers==2.6.1
|
27 |
+
streamlit-pdf-viewer==0.0.14
|
28 |
umap-learn
|
29 |
plotly
|
streamlit_app.py
CHANGED
@@ -274,9 +274,6 @@ with st.sidebar:
|
|
274 |
disabled=st.session_state['doc_id'] is not None or st.session_state['uploaded']
|
275 |
)
|
276 |
|
277 |
-
st.markdown(
|
278 |
-
":warning: [Usage disclaimer](https://github.com/lfoppiano/document-qa?tab=readme-ov-file#disclaimer-on-data-security-and-privacy-%EF%B8%8F) :warning: ")
|
279 |
-
|
280 |
if (model in OPEN_MODELS) and model not in st.session_state['api_keys']:
|
281 |
if 'HUGGINGFACEHUB_API_TOKEN' not in os.environ:
|
282 |
api_key = st.text_input('Huggingface API Key', type="password")
|
@@ -326,7 +323,7 @@ with right_column:
|
|
326 |
st.subheader("Upload a scientific article in PDF, ask questions, get insights.")
|
327 |
|
328 |
st.markdown(
|
329 |
-
":warning:
|
330 |
|
331 |
uploaded_file = st.file_uploader(
|
332 |
"Upload an article",
|
@@ -549,8 +546,6 @@ with left_column:
|
|
549 |
if st.session_state['binary']:
|
550 |
pdf_viewer(
|
551 |
input=st.session_state['binary'],
|
552 |
-
width=600,
|
553 |
-
height=800,
|
554 |
annotation_outline_size=1,
|
555 |
annotations=st.session_state['annotations'],
|
556 |
rendering=st.session_state['pdf_rendering'],
|
|
|
274 |
disabled=st.session_state['doc_id'] is not None or st.session_state['uploaded']
|
275 |
)
|
276 |
|
|
|
|
|
|
|
277 |
if (model in OPEN_MODELS) and model not in st.session_state['api_keys']:
|
278 |
if 'HUGGINGFACEHUB_API_TOKEN' not in os.environ:
|
279 |
api_key = st.text_input('Huggingface API Key', type="password")
|
|
|
323 |
st.subheader("Upload a scientific article in PDF, ask questions, get insights.")
|
324 |
|
325 |
st.markdown(
|
326 |
+
":warning: [Usage disclaimer](https://github.com/lfoppiano/document-qa?tab=readme-ov-file#disclaimer-on-data-security-and-privacy-%EF%B8%8F) :warning: ")
|
327 |
|
328 |
uploaded_file = st.file_uploader(
|
329 |
"Upload an article",
|
|
|
546 |
if st.session_state['binary']:
|
547 |
pdf_viewer(
|
548 |
input=st.session_state['binary'],
|
|
|
|
|
549 |
annotation_outline_size=1,
|
550 |
annotations=st.session_state['annotations'],
|
551 |
rendering=st.session_state['pdf_rendering'],
|