Spaces:
Running
Running
fix
Browse files- pages/upload.py +2 -2
pages/upload.py
CHANGED
@@ -4,7 +4,7 @@ from db.mongodb import save_file_to_mongodb, fetch_file_from_mongodb, detect_fil
|
|
4 |
from powerpoint.pptx import translate_pptx
|
5 |
from excel.xlsx import translate_xlsx
|
6 |
from excel.excel_translate import translate_csv
|
7 |
-
from word.word_translate import
|
8 |
import dotenv
|
9 |
import os
|
10 |
|
@@ -33,7 +33,7 @@ def process_file(file, file_type):
|
|
33 |
elif file_type == "CSV":
|
34 |
final_id = translate_csv(file_id = file_id, source_lang = source_lang, target_lang = target_lang)
|
35 |
elif file_type == "Word":
|
36 |
-
final_id =
|
37 |
else:
|
38 |
st.error("❌ Loại file không hỗ trợ!")
|
39 |
return
|
|
|
4 |
from powerpoint.pptx import translate_pptx
|
5 |
from excel.xlsx import translate_xlsx
|
6 |
from excel.excel_translate import translate_csv
|
7 |
+
from word.word_translate import translate_docx
|
8 |
import dotenv
|
9 |
import os
|
10 |
|
|
|
33 |
elif file_type == "CSV":
|
34 |
final_id = translate_csv(file_id = file_id, source_lang = source_lang, target_lang = target_lang)
|
35 |
elif file_type == "Word":
|
36 |
+
final_id = translate_docx(file_id, source_lang = source_lang, target_lang = target_lang)
|
37 |
else:
|
38 |
st.error("❌ Loại file không hỗ trợ!")
|
39 |
return
|