Spaces:
Runtime error
Runtime error
Update opp.py
Browse files
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 =
|
| 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('
|
| 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:
|
| 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")
|