Spaces:
Running
Running
use only one pdf rendering mode
Browse files- streamlit_app.py +0 -14
streamlit_app.py
CHANGED
|
@@ -93,9 +93,6 @@ if 'should_show_annotations' not in st.session_state:
|
|
| 93 |
if 'pdf' not in st.session_state:
|
| 94 |
st.session_state['pdf'] = None
|
| 95 |
|
| 96 |
-
if 'pdf_rendering' not in st.session_state:
|
| 97 |
-
st.session_state['pdf_rendering'] = None
|
| 98 |
-
|
| 99 |
if 'embeddings' not in st.session_state:
|
| 100 |
st.session_state['embeddings'] = None
|
| 101 |
|
|
@@ -380,16 +377,6 @@ with st.sidebar:
|
|
| 380 |
'The LLM responses undergo post-processing to extract <span style="color:orange">physical quantities, measurements</span>, and <span style="color:green">materials</span> mentions.',
|
| 381 |
unsafe_allow_html=True)
|
| 382 |
|
| 383 |
-
st.session_state['pdf_rendering'] = st.radio(
|
| 384 |
-
"PDF rendering mode",
|
| 385 |
-
("unwrap", "legacy_embed"),
|
| 386 |
-
index=0,
|
| 387 |
-
disabled=not uploaded_file,
|
| 388 |
-
help="PDF rendering engine."
|
| 389 |
-
"Note: The Legacy PDF viewer does not support annotations and might not work on Chrome.",
|
| 390 |
-
format_func=lambda q: "Legacy PDF Viewer" if q == "legacy_embed" else "Streamlit PDF Viewer (Pdf.js)"
|
| 391 |
-
)
|
| 392 |
-
|
| 393 |
st.divider()
|
| 394 |
|
| 395 |
st.header("Documentation")
|
|
@@ -547,6 +534,5 @@ with left_column:
|
|
| 547 |
input=st.session_state['binary'],
|
| 548 |
annotation_outline_size=1,
|
| 549 |
annotations=st.session_state['annotations'],
|
| 550 |
-
rendering=st.session_state['pdf_rendering'],
|
| 551 |
render_text=True
|
| 552 |
)
|
|
|
|
| 93 |
if 'pdf' not in st.session_state:
|
| 94 |
st.session_state['pdf'] = None
|
| 95 |
|
|
|
|
|
|
|
|
|
|
| 96 |
if 'embeddings' not in st.session_state:
|
| 97 |
st.session_state['embeddings'] = None
|
| 98 |
|
|
|
|
| 377 |
'The LLM responses undergo post-processing to extract <span style="color:orange">physical quantities, measurements</span>, and <span style="color:green">materials</span> mentions.',
|
| 378 |
unsafe_allow_html=True)
|
| 379 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 380 |
st.divider()
|
| 381 |
|
| 382 |
st.header("Documentation")
|
|
|
|
| 534 |
input=st.session_state['binary'],
|
| 535 |
annotation_outline_size=1,
|
| 536 |
annotations=st.session_state['annotations'],
|
|
|
|
| 537 |
render_text=True
|
| 538 |
)
|