Update main.py
Browse files
main.py
CHANGED
|
@@ -11,6 +11,14 @@ UPLOAD_DIR = "uploads"
|
|
| 11 |
if not os.path.exists(UPLOAD_DIR):
|
| 12 |
os.makedirs(UPLOAD_DIR)
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
@app.post("/extract/")
|
| 15 |
async def extract_pdf(file: UploadFile = File(...)):
|
| 16 |
"""
|
|
|
|
| 11 |
if not os.path.exists(UPLOAD_DIR):
|
| 12 |
os.makedirs(UPLOAD_DIR)
|
| 13 |
|
| 14 |
+
@app.get("/")
|
| 15 |
+
async def root():
|
| 16 |
+
"""
|
| 17 |
+
Root endpoint that provides a welcome message and basic instructions.
|
| 18 |
+
"""
|
| 19 |
+
return {"message": "Welcome to the PDF Processing API. Use '/extract/' to extract answers from a PDF or '/evaluate/' to evaluate student answers."}
|
| 20 |
+
|
| 21 |
+
|
| 22 |
@app.post("/extract/")
|
| 23 |
async def extract_pdf(file: UploadFile = File(...)):
|
| 24 |
"""
|