Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -129,7 +129,7 @@ def tot_prob():
|
|
| 129 |
print (e)
|
| 130 |
def fin_clear():
|
| 131 |
fin_sum.clear()
|
| 132 |
-
|
| 133 |
with gr.Blocks() as app:
|
| 134 |
gr.Markdown("""<center><h1>AI Image Detector<br><h4>(Test Demo - accuracy varies by model)""")
|
| 135 |
with gr.Column():
|
|
@@ -164,7 +164,7 @@ with gr.Blocks() as app:
|
|
| 164 |
n_out2=gr.Label(label="Output")
|
| 165 |
outp2 = gr.HTML("""""")
|
| 166 |
|
| 167 |
-
|
| 168 |
load_btn.click(load_url,in_url,[inp,mes])
|
| 169 |
btn.click(aiornot0,[inp],[outp0,n_out0]).then(tot_prob,None,fin)
|
| 170 |
btn.click(aiornot1,[inp],[outp1,n_out1]).then(tot_prob,None,fin)
|
|
|
|
| 129 |
print (e)
|
| 130 |
def fin_clear():
|
| 131 |
fin_sum.clear()
|
| 132 |
+
return None
|
| 133 |
with gr.Blocks() as app:
|
| 134 |
gr.Markdown("""<center><h1>AI Image Detector<br><h4>(Test Demo - accuracy varies by model)""")
|
| 135 |
with gr.Column():
|
|
|
|
| 164 |
n_out2=gr.Label(label="Output")
|
| 165 |
outp2 = gr.HTML("""""")
|
| 166 |
|
| 167 |
+
btn.click(fin_clear,None,fin)
|
| 168 |
load_btn.click(load_url,in_url,[inp,mes])
|
| 169 |
btn.click(aiornot0,[inp],[outp0,n_out0]).then(tot_prob,None,fin)
|
| 170 |
btn.click(aiornot1,[inp],[outp1,n_out1]).then(tot_prob,None,fin)
|