Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -217,7 +217,9 @@ def process_user_input(user_question):
|
|
217 |
# Save file output from PDF query results
|
218 |
filename = generate_filename(user_question, 'txt')
|
219 |
create_file(filename, user_question, message.content)
|
220 |
-
|
|
|
|
|
221 |
|
222 |
def main():
|
223 |
# Sidebar and global
|
@@ -324,7 +326,9 @@ def main():
|
|
324 |
response = chat_with_model(user_prompt, file_contents, model_choice)
|
325 |
filename = generate_filename(file_contents, choice)
|
326 |
create_file(filename, file_contents, response)
|
327 |
-
|
|
|
|
|
328 |
|
329 |
if __name__ == "__main__":
|
330 |
main()
|
@@ -332,7 +336,8 @@ if __name__ == "__main__":
|
|
332 |
load_dotenv()
|
333 |
st.write(css, unsafe_allow_html=True)
|
334 |
|
335 |
-
st.header("
|
|
|
336 |
user_question = st.text_input("Ask a question about your documents:")
|
337 |
if user_question:
|
338 |
process_user_input(user_question)
|
|
|
217 |
# Save file output from PDF query results
|
218 |
filename = generate_filename(user_question, 'txt')
|
219 |
create_file(filename, user_question, message.content)
|
220 |
+
|
221 |
+
#st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
222 |
+
|
223 |
|
224 |
def main():
|
225 |
# Sidebar and global
|
|
|
326 |
response = chat_with_model(user_prompt, file_contents, model_choice)
|
327 |
filename = generate_filename(file_contents, choice)
|
328 |
create_file(filename, file_contents, response)
|
329 |
+
|
330 |
+
st.experimental_rerun()
|
331 |
+
#st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
332 |
|
333 |
if __name__ == "__main__":
|
334 |
main()
|
|
|
336 |
load_dotenv()
|
337 |
st.write(css, unsafe_allow_html=True)
|
338 |
|
339 |
+
st.header("
|
340 |
+
documents :books:")
|
341 |
user_question = st.text_input("Ask a question about your documents:")
|
342 |
if user_question:
|
343 |
process_user_input(user_question)
|