Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,18 +130,8 @@ def sentences_f(sentence,df2):
|
|
130 |
df1['معادل'] = df1.apply(lambda row: row['کلمات'] if row['معادل'] == '' else row['معادل'], axis=1)
|
131 |
translated_sentence = ' '.join(df1['معادل'].tolist())
|
132 |
return translated_sentence
|
133 |
-
|
134 |
-
def process():
|
135 |
-
raw_text = get_pdf_text(pdf_docs)
|
136 |
|
137 |
-
# get the text chunks
|
138 |
-
text_chunks = get_text_chunks(raw_text)
|
139 |
-
|
140 |
-
# create vector store
|
141 |
-
vectorstore = get_vectorstore(text_chunks)
|
142 |
-
|
143 |
-
# create conversation chain
|
144 |
-
st.session_state.conversation = get_conversation_chain(vectorstore)
|
145 |
####################################################################################################################
|
146 |
def main():
|
147 |
st.set_page_config(
|
@@ -170,12 +160,11 @@ def main():
|
|
170 |
if st.button("Answer"):
|
171 |
with st.spinner("Answering"):
|
172 |
handle_userinput(user_question)
|
173 |
-
|
174 |
if st.button("CLEAR"):
|
175 |
with st.spinner("CLEARING"):
|
176 |
st.cache_data.clear()
|
177 |
-
|
178 |
-
|
179 |
|
180 |
with st.sidebar:
|
181 |
st.subheader("Your documents")
|
|
|
130 |
df1['معادل'] = df1.apply(lambda row: row['کلمات'] if row['معادل'] == '' else row['معادل'], axis=1)
|
131 |
translated_sentence = ' '.join(df1['معادل'].tolist())
|
132 |
return translated_sentence
|
133 |
+
####################################################################################################################
|
|
|
|
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
####################################################################################################################
|
136 |
def main():
|
137 |
st.set_page_config(
|
|
|
160 |
if st.button("Answer"):
|
161 |
with st.spinner("Answering"):
|
162 |
handle_userinput(user_question)
|
163 |
+
|
164 |
if st.button("CLEAR"):
|
165 |
with st.spinner("CLEARING"):
|
166 |
st.cache_data.clear()
|
167 |
+
|
|
|
168 |
|
169 |
with st.sidebar:
|
170 |
st.subheader("Your documents")
|