Spaces:
Running
Running
change sliders when paragraphs are extracted
Browse files- streamlit_app.py +7 -2
streamlit_app.py
CHANGED
|
@@ -306,9 +306,14 @@ with st.sidebar:
|
|
| 306 |
chunk_size = st.slider("Chunks size", -1, 2000, value=-1,
|
| 307 |
help="Size of chunks in which the document is partitioned",
|
| 308 |
disabled=uploaded_file is not None)
|
| 309 |
-
|
| 310 |
-
|
|
|
|
| 311 |
disabled=not uploaded_file)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
|
| 313 |
st.session_state['ner_processing'] = st.checkbox("Identify materials and properties.")
|
| 314 |
st.markdown(
|
|
|
|
| 306 |
chunk_size = st.slider("Chunks size", -1, 2000, value=-1,
|
| 307 |
help="Size of chunks in which the document is partitioned",
|
| 308 |
disabled=uploaded_file is not None)
|
| 309 |
+
if chunk_size == -1:
|
| 310 |
+
context_size = st.slider("Context size", 3, 20, value=10,
|
| 311 |
+
help="Number of paragraphs to consider when answering a question",
|
| 312 |
disabled=not uploaded_file)
|
| 313 |
+
else:
|
| 314 |
+
context_size = st.slider("Context size", 3, 10, value=4,
|
| 315 |
+
help="Number of chunks to consider when answering a question",
|
| 316 |
+
disabled=not uploaded_file)
|
| 317 |
|
| 318 |
st.session_state['ner_processing'] = st.checkbox("Identify materials and properties.")
|
| 319 |
st.markdown(
|