Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -146,17 +146,14 @@ def process_and_store(pdf_path=None, pptx_path=None):
|
|
| 146 |
images.extend(extract_images_from_pptx(pptx_path))
|
| 147 |
store_data(texts, images)
|
| 148 |
|
| 149 |
-
|
| 150 |
-
process_and_store(pdf_path=pdf_file, pptx_path=pptx_file)
|
| 151 |
|
| 152 |
# FastAPI Endpoints
|
| 153 |
@app.get("/")
|
| 154 |
def greet_json():
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
def greet_json():
|
| 159 |
-
return {"Hello": "Redmind!"}
|
| 160 |
|
| 161 |
@app.get("/retrieval")
|
| 162 |
def retrieval(query: str):
|
|
|
|
| 146 |
images.extend(extract_images_from_pptx(pptx_path))
|
| 147 |
store_data(texts, images)
|
| 148 |
|
| 149 |
+
|
|
|
|
| 150 |
|
| 151 |
# FastAPI Endpoints
|
| 152 |
@app.get("/")
|
| 153 |
def greet_json():
|
| 154 |
+
# Run Data Processing
|
| 155 |
+
process_and_store(pdf_path=pdf_file, pptx_path=pptx_file)
|
| 156 |
+
return {"Document store": "created!"}
|
|
|
|
|
|
|
| 157 |
|
| 158 |
@app.get("/retrieval")
|
| 159 |
def retrieval(query: str):
|