Hadiil commited on
Commit
862463f
·
verified ·
1 Parent(s): 0a6185b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -223,7 +223,7 @@ async def extract_text_from_file(file: UploadFile):
223
 
224
  # Check file type
225
  if not file.filename.lower().endswith((".pdf", ".docx", ".txt")):
226
- logger.error(f"Unsupported file format: {file.filename}")
227
  raise ValueError("Unsupported file format. Please upload a PDF, DOCX, or TXT file.")
228
 
229
  if file.filename.endswith(".pdf"):
 
223
 
224
  # Check file type
225
  if not file.filename.lower().endswith((".pdf", ".docx", ".txt")):
226
+ logger.error(f"Unsupported files format: {file.filename}")
227
  raise ValueError("Unsupported file format. Please upload a PDF, DOCX, or TXT file.")
228
 
229
  if file.filename.endswith(".pdf"):