Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -220,15 +220,23 @@ with gr.Blocks() as app:
|
|
220 |
with gr.Box():
|
221 |
n_out5=gr.Label(label="Output")
|
222 |
outp5 = gr.HTML("""""")
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
btn.click(fin_clear,None,fin)
|
225 |
load_btn.click(load_url,in_url,[inp,mes])
|
226 |
-
btn.click(aiornot0,[inp],[outp0,n_out0]).then(tot_prob,None,fin,show_progress=False)
|
227 |
-
btn.click(aiornot1,[inp],[outp1,n_out1]).then(tot_prob,None,fin,show_progress=False)
|
228 |
-
btn.click(aiornot2,[inp],[outp2,n_out2]).then(tot_prob,None,fin,show_progress=False)
|
229 |
|
230 |
-
btn.click(
|
231 |
-
btn.click(
|
232 |
-
btn.click(
|
|
|
|
|
|
|
|
|
233 |
|
234 |
app.queue(concurrency_count=20).launch()
|
|
|
220 |
with gr.Box():
|
221 |
n_out5=gr.Label(label="Output")
|
222 |
outp5 = gr.HTML("""""")
|
223 |
+
hid_box=gr.Textbox(visible=False)
|
224 |
+
|
225 |
+
def upd(im):
|
226 |
+
image = Image.open(im)
|
227 |
+
image.save(f"{uid}tmp_src.png")
|
228 |
+
return(f"{uid}tmp_src.png")
|
229 |
+
inp.change(upd,inp,hid_box)
|
230 |
+
|
231 |
btn.click(fin_clear,None,fin)
|
232 |
load_btn.click(load_url,in_url,[inp,mes])
|
|
|
|
|
|
|
233 |
|
234 |
+
btn.click(aiornot0,[hid_box],[outp0,n_out0]).then(tot_prob,None,fin,show_progress=False)
|
235 |
+
btn.click(aiornot1,[hid_box],[outp1,n_out1]).then(tot_prob,None,fin,show_progress=False)
|
236 |
+
btn.click(aiornot2,[hid_box],[outp2,n_out2]).then(tot_prob,None,fin,show_progress=False)
|
237 |
+
|
238 |
+
btn.click(image_classifier0,[hid_box],[n_out3]).then(tot_prob,None,fin,show_progress=False)
|
239 |
+
btn.click(image_classifier1,[hid_box],[n_out4]).then(tot_prob,None,fin,show_progress=False)
|
240 |
+
btn.click(image_classifier2,[hid_box],[n_out5]).then(tot_prob,None,fin,show_progress=False)
|
241 |
|
242 |
app.queue(concurrency_count=20).launch()
|