Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 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"):
|