Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -325,8 +325,8 @@ async def process_html(file: UploadFile = File(...)):
|
|
325 |
|
326 |
@app.post("/ask_html")
|
327 |
async def ask_question(file: UploadFile = File(...), query: str = Form(...)):
|
328 |
-
if not
|
329 |
-
raise HTTPException(status_code=400, detail="
|
330 |
|
331 |
file_content = await file.read()
|
332 |
html_content = file_content.decode('utf-8')
|
|
|
325 |
|
326 |
@app.post("/ask_html")
|
327 |
async def ask_question(file: UploadFile = File(...), query: str = Form(...)):
|
328 |
+
if not file :
|
329 |
+
raise HTTPException(status_code=400, detail="HTML file not provided")
|
330 |
|
331 |
file_content = await file.read()
|
332 |
html_content = file_content.decode('utf-8')
|