Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -109,13 +109,14 @@ def get_pdf_text(pdf_docs):
|
|
109 |
text += txt_page
|
110 |
return text
|
111 |
#######################################################################################################################
|
112 |
-
def
|
113 |
st.title("آپلود و نمایش فایل اکسل")
|
114 |
uploaded_file = st.file_uploader("لطفاً فایل اکسل خود را آپلود کنید", type=["xlsx", "xls"])
|
115 |
if uploaded_file is not None:
|
116 |
df = pd.read_excel(uploaded_file)
|
117 |
st.write("دیتا فریم مربوط به فایل اکسل:")
|
118 |
st.write(df)
|
|
|
119 |
|
120 |
################################################################################################################
|
121 |
def sentences_f(sentence,df2):
|
@@ -141,6 +142,7 @@ def main():
|
|
141 |
#st.markdown("This bot tries to answer questions about multiple PDFs. Let the processing of the PDF finish before adding your question. 🙏🏾")
|
142 |
|
143 |
st.write(css, unsafe_allow_html=True)
|
|
|
144 |
|
145 |
|
146 |
if "conversation" not in st.session_state:
|
@@ -162,8 +164,6 @@ def main():
|
|
162 |
|
163 |
|
164 |
with st.sidebar:
|
165 |
-
upload()
|
166 |
-
|
167 |
st.subheader("Your documents")
|
168 |
pdf_docs = st.file_uploader("Upload your PDFs here and click on 'Process'", accept_multiple_files=True)
|
169 |
|
|
|
109 |
text += txt_page
|
110 |
return text
|
111 |
#######################################################################################################################
|
112 |
+
def upload_xls():
|
113 |
st.title("آپلود و نمایش فایل اکسل")
|
114 |
uploaded_file = st.file_uploader("لطفاً فایل اکسل خود را آپلود کنید", type=["xlsx", "xls"])
|
115 |
if uploaded_file is not None:
|
116 |
df = pd.read_excel(uploaded_file)
|
117 |
st.write("دیتا فریم مربوط به فایل اکسل:")
|
118 |
st.write(df)
|
119 |
+
return df
|
120 |
|
121 |
################################################################################################################
|
122 |
def sentences_f(sentence,df2):
|
|
|
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:
|
|
|
164 |
|
165 |
|
166 |
with st.sidebar:
|
|
|
|
|
167 |
st.subheader("Your documents")
|
168 |
pdf_docs = st.file_uploader("Upload your PDFs here and click on 'Process'", accept_multiple_files=True)
|
169 |
|