Spaces:
Runtime error
Runtime error
Update opp.py
Browse files
opp.py
CHANGED
@@ -370,10 +370,9 @@ def writeScores(table, files): # => csv_output, stats_output, stats_toggle
|
|
370 |
return [gr.update(value=scan()), *list(showStats)]
|
371 |
|
372 |
#@title GUI { vertical-output: true, form-width: "50%", display-mode: "both" }
|
373 |
-
tableQueued_False =
|
374 |
queueConcurrency_2 = 10 #@param {type:"integer", min:1}
|
375 |
-
queueUpdateInterval_0 = 0 #@param {type:"slider", min:0, max:10, step:0.2}
|
376 |
-
prevent_thread_lock = True #@param {type:"boolean"}
|
377 |
#@markdown tableQueued == True + queueConcurrency == 1 guarantees stalling on CPU
|
378 |
#@markdown
|
379 |
#@markdown tableQueued - unknown effect on speed or stability
|
@@ -463,9 +462,7 @@ log('GUI start')
|
|
463 |
blks = gr.Blocks(analytics_enabled=False, title="Batch Image Aesthetic Predictor", css=Css)
|
464 |
with blks as demo:
|
465 |
with gr.Accordion('README', open=False):
|
466 |
-
gr.Markdown(description)
|
467 |
-
#if DEBUG and not autoclearLog:
|
468 |
-
#gr.Button('Clear logs').click(lambda: subprocess.call("clear")) #debug
|
469 |
with gr.Row().style(equal_height=False):
|
470 |
with gr.Column(scale=2):
|
471 |
imageinput = gr.Files(file_types=["image"], label="Add images", elem_id="addimg")
|
@@ -490,11 +487,10 @@ with blks as demo:
|
|
490 |
if DEBUG:
|
491 |
demo.load(lambda: log('load'), queue=not True, show_progress=False)
|
492 |
|
493 |
-
demo.queue(api_open=
|
494 |
log('Prelaunch')
|
495 |
|
496 |
-
|
497 |
-
demo.launch(debug=DEBUG, quiet=
|
498 |
-
if (prevent_thread_lock and not DEBUG): demo.block_thread()
|
499 |
|
500 |
#demo.close()
|
|
|
370 |
return [gr.update(value=scan()), *list(showStats)]
|
371 |
|
372 |
#@title GUI { vertical-output: true, form-width: "50%", display-mode: "both" }
|
373 |
+
tableQueued_False = True #@param {type:"boolean"}
|
374 |
queueConcurrency_2 = 10 #@param {type:"integer", min:1}
|
375 |
+
queueUpdateInterval_0 = 0 #@param {type:"slider", min:0, max:10, step:0.2}
|
|
|
376 |
#@markdown tableQueued == True + queueConcurrency == 1 guarantees stalling on CPU
|
377 |
#@markdown
|
378 |
#@markdown tableQueued - unknown effect on speed or stability
|
|
|
462 |
blks = gr.Blocks(analytics_enabled=False, title="Batch Image Aesthetic Predictor", css=Css)
|
463 |
with blks as demo:
|
464 |
with gr.Accordion('README', open=False):
|
465 |
+
gr.Markdown(description)
|
|
|
|
|
466 |
with gr.Row().style(equal_height=False):
|
467 |
with gr.Column(scale=2):
|
468 |
imageinput = gr.Files(file_types=["image"], label="Add images", elem_id="addimg")
|
|
|
487 |
if DEBUG:
|
488 |
demo.load(lambda: log('load'), queue=not True, show_progress=False)
|
489 |
|
490 |
+
demo.queue(api_open= False, status_update_rate='auto' if queueUpdateInterval_0 == 0 else queueUpdateInterval_0 , concurrency_count=max(queueConcurrency_2, 1))
|
491 |
log('Prelaunch')
|
492 |
|
493 |
+
demo.dev_mode = True
|
494 |
+
demo.launch(debug=DEBUG, quiet=not DEBUG, show_error=True)
|
|
|
495 |
|
496 |
#demo.close()
|