Spaces:
Runtime error
Runtime error
Update streamlit_langchain_chat/streamlit_app.py
Browse files
streamlit_langchain_chat/streamlit_app.py
CHANGED
@@ -196,7 +196,7 @@ def collect_dataset_and_built_index():
|
|
196 |
print(e)
|
197 |
pass
|
198 |
|
199 |
-
# dataset is pandas dataframe
|
200 |
if some_files:
|
201 |
for uploaded_files_row in uploaded_files_rows:
|
202 |
key = uploaded_files_row.get('citation string') if ',' not in uploaded_files_row.get('citation string') else None
|
@@ -272,13 +272,13 @@ def get_answer():
|
|
272 |
|
273 |
def load_main_page():
|
274 |
"""
|
275 |
-
Load the body of web.
|
276 |
"""
|
277 |
# Streamlit HTML Markdown
|
278 |
# st.title <h1> #
|
279 |
# st.header <h2> ##
|
280 |
# st.subheader <h3> ###
|
281 |
-
st.markdown(f"##
|
282 |
validate_status()
|
283 |
st.markdown(f"#### **Status**: {app.params['status']}")
|
284 |
|
@@ -501,7 +501,7 @@ def request_pathname(files):
|
|
501 |
if not files:
|
502 |
return [["", ""]]
|
503 |
|
504 |
-
# check if
|
505 |
if not Path.exists(TEMP_DIR):
|
506 |
TEMP_DIR.mkdir(
|
507 |
parents=True,
|
|
|
196 |
print(e)
|
197 |
pass
|
198 |
|
199 |
+
# dataset is stored as a pandas dataframe
|
200 |
if some_files:
|
201 |
for uploaded_files_row in uploaded_files_rows:
|
202 |
key = uploaded_files_row.get('citation string') if ',' not in uploaded_files_row.get('citation string') else None
|
|
|
272 |
|
273 |
def load_main_page():
|
274 |
"""
|
275 |
+
Load the body of web app.
|
276 |
"""
|
277 |
# Streamlit HTML Markdown
|
278 |
# st.title <h1> #
|
279 |
# st.header <h2> ##
|
280 |
# st.subheader <h3> ###
|
281 |
+
st.markdown(f"## Retrieval Augmented Document Q&A Chat ({APP_VERSION})")
|
282 |
validate_status()
|
283 |
st.markdown(f"#### **Status**: {app.params['status']}")
|
284 |
|
|
|
501 |
if not files:
|
502 |
return [["", ""]]
|
503 |
|
504 |
+
# check if temp directory exist, if not create it
|
505 |
if not Path.exists(TEMP_DIR):
|
506 |
TEMP_DIR.mkdir(
|
507 |
parents=True,
|