Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ def main():
|
|
142 |
#st.markdown("This bot tries to answer questions about multiple PDFs. Let the processing of the PDF finish before adding your question. 🙏🏾")
|
143 |
|
144 |
st.write(css, unsafe_allow_html=True)
|
145 |
-
upload_xls()
|
146 |
|
147 |
|
148 |
if "conversation" not in st.session_state:
|
@@ -153,8 +153,9 @@ def main():
|
|
153 |
|
154 |
st.header("Chat Bot PDFs :books:")
|
155 |
user_question1 = st.text_input("Ask a question about your documents:")
|
|
|
156 |
translator = GoogleTranslator(source='persian', target='english')
|
157 |
-
user_question = translator.translate(
|
158 |
if st.button("Answer"):
|
159 |
with st.spinner("Answering"):
|
160 |
handle_userinput(user_question)
|
|
|
142 |
#st.markdown("This bot tries to answer questions about multiple PDFs. Let the processing of the PDF finish before adding your question. 🙏🏾")
|
143 |
|
144 |
st.write(css, unsafe_allow_html=True)
|
145 |
+
df2=upload_xls()
|
146 |
|
147 |
|
148 |
if "conversation" not in st.session_state:
|
|
|
153 |
|
154 |
st.header("Chat Bot PDFs :books:")
|
155 |
user_question1 = st.text_input("Ask a question about your documents:")
|
156 |
+
user_question2=sentences_f(sentence=user_question1,df2=df2)
|
157 |
translator = GoogleTranslator(source='persian', target='english')
|
158 |
+
user_question = translator.translate(user_question2)
|
159 |
if st.button("Answer"):
|
160 |
with st.spinner("Answering"):
|
161 |
handle_userinput(user_question)
|