Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def process_input(file, text, selected_lang):
|
|
| 15 |
|
| 16 |
# 输入优先级: 文件 > 文本
|
| 17 |
if file:
|
| 18 |
-
ext = os.path.splitext(file
|
| 19 |
|
| 20 |
if ext in [".txt", ".pdf", ".docx"]:
|
| 21 |
try:
|
|
|
|
| 15 |
|
| 16 |
# 输入优先级: 文件 > 文本
|
| 17 |
if file:
|
| 18 |
+
ext = os.path.splitext(file)[-1].lower()
|
| 19 |
|
| 20 |
if ext in [".txt", ".pdf", ".docx"]:
|
| 21 |
try:
|