Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,9 +76,9 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 76 |
with open(file_path, "r", encoding="utf-8") as f:
|
| 77 |
file_content = f.read()
|
| 78 |
print(f"File Content is {file_content}, {file_path}")
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
elif file_name.endswith(".docx"):
|
| 83 |
try:
|
| 84 |
doc = Document(file_path)
|
|
|
|
| 76 |
with open(file_path, "r", encoding="utf-8") as f:
|
| 77 |
file_content = f.read()
|
| 78 |
print(f"File Content is {file_content}, {file_path}")
|
| 79 |
+
except Exception as e:
|
| 80 |
+
print(f"Error reading text file {file_path}: {e}")
|
| 81 |
+
file_content = None
|
| 82 |
elif file_name.endswith(".docx"):
|
| 83 |
try:
|
| 84 |
doc = Document(file_path)
|