Spaces:
Sleeping
Sleeping
Commit
·
9253656
1
Parent(s):
ed7eab5
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,7 @@ def upload_file():
|
|
| 8 |
txt_file = request.files['txt_file']
|
| 9 |
|
| 10 |
# Считываем строки из загруженного файла TXT
|
| 11 |
-
lines = txt_file.read().decode().split("
|
| 12 |
-
")
|
| 13 |
|
| 14 |
# Создаем словарь в формате JSON
|
| 15 |
json_data = {str(index+1): line.strip() for index, line in enumerate(lines)}
|
|
|
|
| 8 |
txt_file = request.files['txt_file']
|
| 9 |
|
| 10 |
# Считываем строки из загруженного файла TXT
|
| 11 |
+
lines = txt_file.read().decode().split("")
|
|
|
|
| 12 |
|
| 13 |
# Создаем словарь в формате JSON
|
| 14 |
json_data = {str(index+1): line.strip() for index, line in enumerate(lines)}
|