Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -446,13 +446,7 @@ with demo:
|
|
446 |
|
447 |
# blz --------------------
|
448 |
with gr.Row():
|
449 |
-
gr.Button("Download", link="/file=
|
450 |
-
face = gr.Interface(
|
451 |
-
fn=print,
|
452 |
-
inputs="button",
|
453 |
-
outputs=gr.File(label="Output File", file_count="single", file_types=[".csv"])
|
454 |
-
)
|
455 |
-
iface.launch()
|
456 |
# end blz -------------------
|
457 |
|
458 |
with gr.Row():
|
@@ -465,11 +459,14 @@ with demo:
|
|
465 |
show_copy_button=True,
|
466 |
)
|
467 |
|
|
|
|
|
|
|
468 |
print(f"app start time {time.time() - app_start_time:.2f} seconds")
|
469 |
|
470 |
scheduler = BackgroundScheduler()
|
471 |
scheduler.add_job(restart_space, "interval", seconds=1800)
|
472 |
scheduler.start()
|
473 |
-
demo.queue(default_concurrency_limit=40).launch()
|
474 |
|
475 |
print(f"app start after demo.queue {time.time() - app_start_time:.2f} seconds")
|
|
|
446 |
|
447 |
# blz --------------------
|
448 |
with gr.Row():
|
449 |
+
gr.Button("Download", link="/file=output/results.csv")
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
# end blz -------------------
|
451 |
|
452 |
with gr.Row():
|
|
|
459 |
show_copy_button=True,
|
460 |
)
|
461 |
|
462 |
+
|
463 |
+
open('output/results.csv', 'w').write('hello world')
|
464 |
+
|
465 |
print(f"app start time {time.time() - app_start_time:.2f} seconds")
|
466 |
|
467 |
scheduler = BackgroundScheduler()
|
468 |
scheduler.add_job(restart_space, "interval", seconds=1800)
|
469 |
scheduler.start()
|
470 |
+
demo.queue(default_concurrency_limit=40).launch(allowed_paths=["output/"]) # blz allowed paths
|
471 |
|
472 |
print(f"app start after demo.queue {time.time() - app_start_time:.2f} seconds")
|