Update app.py
Browse files
app.py
CHANGED
@@ -197,19 +197,19 @@ def comment_generate(prompt, history,post_check,full_conv,persona2, agent_name=a
|
|
197 |
# for ea in
|
198 |
'''
|
199 |
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
# print(e)
|
214 |
return "",history,out_json,out_json,out_json,html_out
|
215 |
|
|
|
197 |
# for ea in
|
198 |
'''
|
199 |
|
200 |
+
with open(f'{uid}.json', 'w') as f:
|
201 |
+
json_hist=json.dumps(out_json, indent=4)
|
202 |
+
f.write(json_hist)
|
203 |
+
f.close()
|
204 |
+
|
205 |
+
upload_file(
|
206 |
+
path_or_fileobj =f"{uid}.json",
|
207 |
+
path_in_repo = f"book1/{file_n}",
|
208 |
+
repo_id =f"{username}/{dataset_name}",
|
209 |
+
repo_type = "dataset",
|
210 |
+
token=token,
|
211 |
+
)
|
212 |
+
#except Exception as e:
|
213 |
# print(e)
|
214 |
return "",history,out_json,out_json,out_json,html_out
|
215 |
|