Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,13 +52,11 @@ def store_document_data(PDF_FILE):
|
|
| 52 |
|
| 53 |
try:
|
| 54 |
index = faiss.IndexFlatL2(embedding.shape[1])
|
| 55 |
-
response = requests.post(API_URL,
|
| 56 |
-
response_data = response.json()
|
| 57 |
-
return response_data
|
| 58 |
except requests.exceptions.RequestException as e:
|
| 59 |
return {"error": str(e)}
|
| 60 |
|
| 61 |
-
return embedding
|
| 62 |
else:
|
| 63 |
return "No PDF file provided."
|
| 64 |
|
|
|
|
| 52 |
|
| 53 |
try:
|
| 54 |
index = faiss.IndexFlatL2(embedding.shape[1])
|
| 55 |
+
response = requests.post(API_URL, index)
|
|
|
|
|
|
|
| 56 |
except requests.exceptions.RequestException as e:
|
| 57 |
return {"error": str(e)}
|
| 58 |
|
| 59 |
+
return "embedding"
|
| 60 |
else:
|
| 61 |
return "No PDF file provided."
|
| 62 |
|