seedmanc commited on
Commit
ba08a13
1 Parent(s): 965bdf0

Update opp.py

Browse files
Files changed (1) hide show
  1. opp.py +5 -5
opp.py CHANGED
@@ -136,7 +136,7 @@ def predict(image):
136
  return score, clipped
137
 
138
  #@title Wrapper & stats { form-width: "10%" }
139
- DEBUG = True #@param {type:"boolean"}
140
  autoclearLog = True #@param {type:"boolean"}
141
  import csv
142
  import sys
@@ -370,7 +370,7 @@ 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 = 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
  prevent_thread_lock = False #@param {type:"boolean"}
@@ -450,7 +450,7 @@ def toggleRun(files): # => submit, dataframe, status
450
  if eta:
451
  log('INTERRUPTED at ss remaining (extra)', eta)
452
  resetStatus()
453
- if DEBUG:# and autoclearLog):
454
  subprocess.call('clear')
455
  print('\r')
456
 
@@ -464,8 +464,8 @@ blks = gr.Blocks(analytics_enabled=False, title="Batch Image Aesthetic Predictor
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")
 
136
  return score, clipped
137
 
138
  #@title Wrapper & stats { form-width: "10%" }
139
+ DEBUG = False #@param {type:"boolean"}
140
  autoclearLog = True #@param {type:"boolean"}
141
  import csv
142
  import sys
 
370
  return [gr.update(value=scan()), *list(showStats)]
371
 
372
  #@title GUI { vertical-output: true, form-width: "50%", display-mode: "both" }
373
+ tableQueued_False = False #@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
  prevent_thread_lock = False #@param {type:"boolean"}
 
450
  if eta:
451
  log('INTERRUPTED at ss remaining (extra)', eta)
452
  resetStatus()
453
+ if DEBUG and autoclearLog):
454
  subprocess.call('clear')
455
  print('\r')
456
 
 
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")