Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -411,7 +411,7 @@ async def translate_document(file: UploadFile = File(...), target_language: str
|
|
| 411 |
translated_text = "\n\n".join(translated_chunks)
|
| 412 |
save_file(translated_text, file_type, output_path)
|
| 413 |
|
| 414 |
-
return
|
| 415 |
|
| 416 |
except Exception as e:
|
| 417 |
raise HTTPException(status_code=500, detail=str(e))
|
|
|
|
| 411 |
translated_text = "\n\n".join(translated_chunks)
|
| 412 |
save_file(translated_text, file_type, output_path)
|
| 413 |
|
| 414 |
+
return FileResponse(output_path, filename=output_filename)
|
| 415 |
|
| 416 |
except Exception as e:
|
| 417 |
raise HTTPException(status_code=500, detail=str(e))
|