Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -194,9 +194,9 @@ def process_pdf(file):
|
|
194 |
paper_text = chatbot.parse_paper(pdf)
|
195 |
global df
|
196 |
df = chatbot.paper_df(paper_text)
|
197 |
-
|
198 |
print("Done processing pdf")
|
199 |
-
return
|
200 |
|
201 |
def download_pdf(url):
|
202 |
chatbot = Chatbot()
|
@@ -206,9 +206,9 @@ def download_pdf(url):
|
|
206 |
paper_text = chatbot.parse_paper(pdf)
|
207 |
global df
|
208 |
df = chatbot.paper_df(paper_text)
|
209 |
-
|
210 |
print("Done processing pdf")
|
211 |
-
return
|
212 |
|
213 |
def show_pdf(file_content):
|
214 |
base64_pdf = base64.b64encode(file_content).decode('utf-8')
|
|
|
194 |
paper_text = chatbot.parse_paper(pdf)
|
195 |
global df
|
196 |
df = chatbot.paper_df(paper_text)
|
197 |
+
embeddings = chatbot.calculate_embeddings(df)
|
198 |
print("Done processing pdf")
|
199 |
+
return embeddings
|
200 |
|
201 |
def download_pdf(url):
|
202 |
chatbot = Chatbot()
|
|
|
206 |
paper_text = chatbot.parse_paper(pdf)
|
207 |
global df
|
208 |
df = chatbot.paper_df(paper_text)
|
209 |
+
embeddings = chatbot.calculate_embeddings(df)
|
210 |
print("Done processing pdf")
|
211 |
+
return embeddings
|
212 |
|
213 |
def show_pdf(file_content):
|
214 |
base64_pdf = base64.b64encode(file_content).decode('utf-8')
|