Nithin1905 commited on
Commit
1247b9c
1 Parent(s): 7cb3474

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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 file_store:
329
- raise HTTPException(status_code=400, detail="No HTML file has been processed yet")
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')