Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ async def addPDFData(vectorstorename: str, pdf: UploadFile = File(...)):
|
|
59 |
text = ""
|
60 |
for page in reader.pages:
|
61 |
text += page.extract_text()
|
62 |
-
addDocuments(text = text,
|
63 |
output = {
|
64 |
"output": "SUCCESS"
|
65 |
}
|
@@ -73,7 +73,7 @@ async def addPDFData(vectorstorename: str, pdf: UploadFile = File(...)):
|
|
73 |
|
74 |
@app.post("/addText")
|
75 |
async def addText(vectorstorename: str, text: str):
|
76 |
-
addDocuments(text = text,
|
77 |
output = {
|
78 |
"output": "SUCCESS"
|
79 |
}
|
|
|
59 |
text = ""
|
60 |
for page in reader.pages:
|
61 |
text += page.extract_text()
|
62 |
+
addDocuments(text = text, vectorstorename = vectorstorename)
|
63 |
output = {
|
64 |
"output": "SUCCESS"
|
65 |
}
|
|
|
73 |
|
74 |
@app.post("/addText")
|
75 |
async def addText(vectorstorename: str, text: str):
|
76 |
+
addDocuments(text = text, vectorstorename = vectorstorename)
|
77 |
output = {
|
78 |
"output": "SUCCESS"
|
79 |
}
|