Spaces:
Runtime error
Runtime error
hugforziio
commited on
Commit
•
c282977
1
Parent(s):
c147947
Update functions.py
Browse files- functions.py +2 -2
functions.py
CHANGED
@@ -76,7 +76,7 @@ def make_history_file_fn(history):
|
|
76 |
# 如果目录不存在,则创建目录
|
77 |
os.makedirs('temp_files', exist_ok=True)
|
78 |
|
79 |
-
json_file_content = json.dumps(history)
|
80 |
json_file_path = os.path.join('temp_files', f'history[{uuid4}].json')
|
81 |
with open(json_file_path, 'w') as f:
|
82 |
f.write(json_file_content)
|
@@ -97,7 +97,7 @@ def make_history_file_fn(history):
|
|
97 |
def make_history_file_fn__(history):
|
98 |
uuid4 = str(uuid.uuid4())
|
99 |
try:
|
100 |
-
json_file_content = json.dumps(history)
|
101 |
json_file_path = os.path.join('temp_files', f'history[{uuid4}].json')
|
102 |
with open(json_file_path, 'w') as f:
|
103 |
f.write(json_file_content)
|
|
|
76 |
# 如果目录不存在,则创建目录
|
77 |
os.makedirs('temp_files', exist_ok=True)
|
78 |
|
79 |
+
json_file_content = json.dumps(history, ensure_ascii=False)
|
80 |
json_file_path = os.path.join('temp_files', f'history[{uuid4}].json')
|
81 |
with open(json_file_path, 'w') as f:
|
82 |
f.write(json_file_content)
|
|
|
97 |
def make_history_file_fn__(history):
|
98 |
uuid4 = str(uuid.uuid4())
|
99 |
try:
|
100 |
+
json_file_content = json.dumps(history, ensure_ascii=False)
|
101 |
json_file_path = os.path.join('temp_files', f'history[{uuid4}].json')
|
102 |
with open(json_file_path, 'w') as f:
|
103 |
f.write(json_file_content)
|