Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -285,20 +285,20 @@ def find_rss():
|
|
285 |
|
286 |
out_box.append(lod)
|
287 |
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
yield out_box,[(None,'Sources are loaded. You can ask a question about them now.')]
|
303 |
|
304 |
with gr.Blocks() as app:
|
|
|
285 |
|
286 |
out_box.append(lod)
|
287 |
|
288 |
+
#user_repo=save_data.split('datasets/',1)[1].split('/raw',1)[0]
|
289 |
+
timestamp=str(datetime.datetime.now())
|
290 |
+
timename=timestamp.replace(" ","--").replace(":","-").replace(".","-")
|
291 |
+
|
292 |
+
json_object = json.dumps(out_box, indent=4)
|
293 |
+
with open("tmp1.json", "w") as outfile:
|
294 |
+
outfile.write(json_object)
|
295 |
+
api.upload_file(
|
296 |
+
path_or_fileobj="tmp1.json",
|
297 |
+
path_in_repo=f"/rss/{timename}.json",
|
298 |
+
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
299 |
+
token=token_self,
|
300 |
+
repo_type="dataset",
|
301 |
+
)
|
302 |
yield out_box,[(None,'Sources are loaded. You can ask a question about them now.')]
|
303 |
|
304 |
with gr.Blocks() as app:
|