seedmanc commited on
Commit
14977c1
1 Parent(s): 90e53a6

Update opp.py

Browse files
Files changed (1) hide show
  1. opp.py +3 -3
opp.py CHANGED
@@ -137,7 +137,7 @@ def predict(image):
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
143
  import gradio as gr
@@ -450,7 +450,7 @@ def toggleRun(files): # => submit, dataframe, status
450
  log('INTERRUPTED at ss remaining (extra)', eta)
451
  resetStatus()
452
  if (DEBUG and autoclearLog):
453
- os.system('cls' if os.name=='nt' else 'clear')
454
  print('\r')
455
 
456
  clearStats()
@@ -464,7 +464,7 @@ with blks as demo:
464
  with gr.Accordion('README', open=False):
465
  gr.Markdown(description)
466
  if DEBUG and not autoclearLog:
467
- gr.Button('Clear logs').click(lambda: os.system('cls' if os.name=='nt' else 'clear')) #debug
468
  with gr.Row().style(equal_height=False):
469
  with gr.Column(scale=2):
470
  imageinput = gr.Files(file_types=["image"], label="Add images", elem_id="addimg")
 
137
 
138
  #@title Wrapper & stats { form-width: "10%" }
139
  DEBUG = True #@param {type:"boolean"}
140
+ autoclearLog = False #@param {type:"boolean"}
141
  import csv
142
  import sys
143
  import gradio as gr
 
450
  log('INTERRUPTED at ss remaining (extra)', eta)
451
  resetStatus()
452
  if (DEBUG and autoclearLog):
453
+ os.system('clear')
454
  print('\r')
455
 
456
  clearStats()
 
464
  with gr.Accordion('README', open=False):
465
  gr.Markdown(description)
466
  if DEBUG and not autoclearLog:
467
+ gr.Button('Clear logs').click(lambda: print("\033[H\033[3J", end="")) #debug
468
  with gr.Row().style(equal_height=False):
469
  with gr.Column(scale=2):
470
  imageinput = gr.Files(file_types=["image"], label="Add images", elem_id="addimg")