Update app.py
Browse files
app.py
CHANGED
|
@@ -24,12 +24,12 @@ def checker(content):
|
|
| 24 |
|
| 25 |
# Funktion zur Verarbeitung der hochgeladenen Datei
|
| 26 |
def process_file(file):
|
| 27 |
-
|
| 28 |
#with open(file.name, 'r', encoding='utf-8') as f:
|
| 29 |
# content = f.read()
|
| 30 |
with open(file.name, 'rb') as f:
|
| 31 |
content = pickle.load(f)
|
| 32 |
-
return content
|
| 33 |
return "Datei konnte nicht gelesen werden"
|
| 34 |
|
| 35 |
def is_valid_file(file_path: str, file_types: list[str]) -> bool:
|
|
|
|
| 24 |
|
| 25 |
# Funktion zur Verarbeitung der hochgeladenen Datei
|
| 26 |
def process_file(file):
|
| 27 |
+
if file:
|
| 28 |
#with open(file.name, 'r', encoding='utf-8') as f:
|
| 29 |
# content = f.read()
|
| 30 |
with open(file.name, 'rb') as f:
|
| 31 |
content = pickle.load(f)
|
| 32 |
+
return content
|
| 33 |
return "Datei konnte nicht gelesen werden"
|
| 34 |
|
| 35 |
def is_valid_file(file_path: str, file_types: list[str]) -> bool:
|