Spaces:
Sleeping
Sleeping
Upload st_data_parser.py
Browse files- st_data_parser.py +1 -1
st_data_parser.py
CHANGED
@@ -81,7 +81,7 @@ def parser(file):
|
|
81 |
### 本质上txt文件和json文件的处理方式是一样的。
|
82 |
txt_file = file.getvalue() ## 在streamlit中获得上传文件的json文件内容。这里不能用file.read().
|
83 |
# txt_file = txt_file.decode('utf-8') ### working.
|
84 |
-
txt_file = txt_file.
|
85 |
|
86 |
## 保障是utf-8的格式
|
87 |
# with open(file.name, 'r', encoding='utf-8') as f:
|
|
|
81 |
### 本质上txt文件和json文件的处理方式是一样的。
|
82 |
txt_file = file.getvalue() ## 在streamlit中获得上传文件的json文件内容。这里不能用file.read().
|
83 |
# txt_file = txt_file.decode('utf-8') ### working.
|
84 |
+
txt_file = txt_file.decode('utf-8')
|
85 |
|
86 |
## 保障是utf-8的格式
|
87 |
# with open(file.name, 'r', encoding='utf-8') as f:
|