Spaces:
Sleeping
Sleeping
sourabhzanwar
commited on
Commit
•
9d27621
1
Parent(s):
e937fe6
resolved warning for `label` got an empty value
Browse files
app.py
CHANGED
@@ -54,7 +54,6 @@ txt_converter = TextConverter(remove_numeric_tables=True, valid_languages=["en",
|
|
54 |
DISABLE_FILE_UPLOAD = bool(os.getenv("DISABLE_FILE_UPLOAD"))
|
55 |
# Define a function to handle file uploads
|
56 |
def upload_files():
|
57 |
-
print(f'Uploading files at {datetime.now()}')
|
58 |
uploaded_files = upload_container.file_uploader(
|
59 |
"upload", type=["pdf", "txt", "docx"], accept_multiple_files=True, label_visibility="hidden"
|
60 |
)
|
@@ -91,6 +90,7 @@ def reset_documents():
|
|
91 |
document_store.delete_documents()
|
92 |
|
93 |
def upload_document():
|
|
|
94 |
upload_status = 0
|
95 |
if data_files is not None:
|
96 |
for data_file in data_files:
|
@@ -166,7 +166,7 @@ try:
|
|
166 |
if "question" not in st.session_state:
|
167 |
st.session_state.question = ""
|
168 |
# Search bar
|
169 |
-
question = st.text_input("", value=st.session_state.question, max_chars=100, on_change=reset_results)
|
170 |
|
171 |
run_pressed = st.button("Run")
|
172 |
|
|
|
54 |
DISABLE_FILE_UPLOAD = bool(os.getenv("DISABLE_FILE_UPLOAD"))
|
55 |
# Define a function to handle file uploads
|
56 |
def upload_files():
|
|
|
57 |
uploaded_files = upload_container.file_uploader(
|
58 |
"upload", type=["pdf", "txt", "docx"], accept_multiple_files=True, label_visibility="hidden"
|
59 |
)
|
|
|
90 |
document_store.delete_documents()
|
91 |
|
92 |
def upload_document():
|
93 |
+
print(f'Uploading document store at {datetime.now()}')
|
94 |
upload_status = 0
|
95 |
if data_files is not None:
|
96 |
for data_file in data_files:
|
|
|
166 |
if "question" not in st.session_state:
|
167 |
st.session_state.question = ""
|
168 |
# Search bar
|
169 |
+
question = st.text_input("Question", value=st.session_state.question, max_chars=100, on_change=reset_results, label_visibility="hidden")
|
170 |
|
171 |
run_pressed = st.button("Run")
|
172 |
|