Update app.py
Browse files
app.py
CHANGED
@@ -43,18 +43,18 @@ def build_experimental_ui():
|
|
43 |
|
44 |
if tabs=='Question & Answer':
|
45 |
|
46 |
-
pdf_docs = st.file_uploader('Upload a PDF file', type=['pdf'],accept_multiple_files=True)
|
47 |
-
st.session_state['pdf_file'] = pdf_docs
|
48 |
-
Process = st.button("Process", disabled=(pdf_docs==[]))
|
49 |
|
50 |
-
if Process:
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
|
60 |
st.markdown('---')
|
@@ -65,12 +65,14 @@ def build_experimental_ui():
|
|
65 |
# else:
|
66 |
# disable_query = False
|
67 |
|
68 |
-
|
69 |
|
70 |
questions_file = st.file_uploader('Upload a CSV file with questions', type=['csv'],accept_multiple_files=False)
|
71 |
|
72 |
if questions_file:
|
73 |
-
|
|
|
|
|
74 |
|
75 |
return
|
76 |
|
|
|
43 |
|
44 |
if tabs=='Question & Answer':
|
45 |
|
46 |
+
# pdf_docs = st.file_uploader('Upload a PDF file', type=['pdf'],accept_multiple_files=True)
|
47 |
+
# st.session_state['pdf_file'] = pdf_docs
|
48 |
+
# Process = st.button("Process", disabled=(pdf_docs==[]))
|
49 |
|
50 |
+
# if Process:
|
51 |
+
# if pdf_docs:
|
52 |
+
# if pdf_docs!=st.session_state['pdf_file']:
|
53 |
+
# st.session_state['pdf_file'] = pdf_docs
|
54 |
+
# with st.spinner('Creating embeddings...'):
|
55 |
+
# texts = load_pdf_document(pdf_docs=pdf_docs)
|
56 |
+
# retriever = get_retriever_from_text(texts, embeddings[selected_embeddings])
|
57 |
+
# st.session_state['retriever'] = retriever
|
58 |
|
59 |
|
60 |
st.markdown('---')
|
|
|
65 |
# else:
|
66 |
# disable_query = False
|
67 |
|
68 |
+
prompt = st.text_input('Input your prompt', disabled=False, key="text")
|
69 |
|
70 |
questions_file = st.file_uploader('Upload a CSV file with questions', type=['csv'],accept_multiple_files=False)
|
71 |
|
72 |
if questions_file:
|
73 |
+
questions_df = pd.read_csv(questions_file))
|
74 |
+
|
75 |
+
|
76 |
|
77 |
return
|
78 |
|