Update app.py
Browse files
app.py
CHANGED
|
@@ -440,14 +440,16 @@ def upload_pdf(files):
|
|
| 440 |
# Entfernen der vorhandenen Datei, falls sie existiert
|
| 441 |
if os.path.exists(upload_path):
|
| 442 |
os.remove(upload_path)
|
| 443 |
-
|
| 444 |
|
| 445 |
# Datei zum Hugging Face Space hochladen
|
| 446 |
upload_file_to_huggingface(file.name, upload_path)
|
| 447 |
|
| 448 |
except Exception as e:
|
| 449 |
logging.error(f"Error uploading file {file.name}: {e}")
|
| 450 |
-
|
|
|
|
|
|
|
| 451 |
|
| 452 |
return status_message, display_files()
|
| 453 |
|
|
|
|
| 440 |
# Entfernen der vorhandenen Datei, falls sie existiert
|
| 441 |
if os.path.exists(upload_path):
|
| 442 |
os.remove(upload_path)
|
| 443 |
+
print("altes File removed.................")
|
| 444 |
|
| 445 |
# Datei zum Hugging Face Space hochladen
|
| 446 |
upload_file_to_huggingface(file.name, upload_path)
|
| 447 |
|
| 448 |
except Exception as e:
|
| 449 |
logging.error(f"Error uploading file {file.name}: {e}")
|
| 450 |
+
status_message = "Nicht alle Dateien konnten hochgeladen werden..."
|
| 451 |
+
|
| 452 |
+
status_message += "Hochladen der Dateien abgeschlossen!"
|
| 453 |
|
| 454 |
return status_message, display_files()
|
| 455 |
|