Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ imagens = []
|
|
13 |
|
14 |
model = gr.Interface.load(
|
15 |
"models/dreamlike-art/dreamlike-photoreal-2.0",
|
|
|
16 |
)
|
17 |
|
18 |
#o = os.getenv("P")
|
@@ -90,7 +91,7 @@ def build():
|
|
90 |
message2=gr.HTML("",visible=False)
|
91 |
|
92 |
with gr.Row():
|
93 |
-
out1 = gr.Image(
|
94 |
out2 = gr.Image()
|
95 |
with gr.Row():
|
96 |
out3 = gr.Image()
|
@@ -106,6 +107,7 @@ def build():
|
|
106 |
h_variavel=gr.Textbox(value="V")
|
107 |
t_state=gr.Number()
|
108 |
t_switch=gr.Textbox(value=0)
|
|
|
109 |
def clear_all():
|
110 |
return "",None,None,None,None,None,None,None,None,1,gr.HTML.update("<div></div>")
|
111 |
fac_b = gr.Textbox(value="",visible=False)
|
@@ -121,12 +123,13 @@ def build():
|
|
121 |
b4=out2.change(im_fn,[prompt,noise_level,h_variavel],[out3,], show_progress=True)
|
122 |
b5=out3.change(im_fn,[prompt,noise_level,h_variavel],[out4,], show_progress=True)
|
123 |
b6=out4.change(im_fn,[prompt,noise_level,h_variavel],[out5,], show_progress=True)
|
124 |
-
b7=out5.change(im_fn,[prompt,noise_level,h_variavel],[out6
|
125 |
-
b8=out6.change(noth,None,[message], show_progress=False)
|
|
|
126 |
swi=t_switch.change(clear,None,[t_switch,fac_b], cancels=[sta,b2,b3,b4,b5,b6,b7],show_progress=False)
|
127 |
#btn2.click(noth,None,message,cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
|
128 |
btn2.click(clear_all, None,[fac_b,prompt,out1,out2,out3,out4,out5,out6,t_state,t_switch,message],cancels=[b1,sta,b2,b3,b4,b5,b6,b7,b8,swi],show_progress=False)
|
129 |
# btn3.click(zip_files,None,[caixa],show_progress=False)
|
130 |
# caixa.change(noth,None,[message],show_progress=False)
|
131 |
b.queue(concurrency_count=100).launch(show_api=False)
|
132 |
-
build()
|
|
|
13 |
|
14 |
model = gr.Interface.load(
|
15 |
"models/dreamlike-art/dreamlike-photoreal-2.0",
|
16 |
+
api_key="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",
|
17 |
)
|
18 |
|
19 |
#o = os.getenv("P")
|
|
|
91 |
message2=gr.HTML("",visible=False)
|
92 |
|
93 |
with gr.Row():
|
94 |
+
out1 = gr.Image()
|
95 |
out2 = gr.Image()
|
96 |
with gr.Row():
|
97 |
out3 = gr.Image()
|
|
|
107 |
h_variavel=gr.Textbox(value="V")
|
108 |
t_state=gr.Number()
|
109 |
t_switch=gr.Textbox(value=0)
|
110 |
+
auto= gr.Image()
|
111 |
def clear_all():
|
112 |
return "",None,None,None,None,None,None,None,None,1,gr.HTML.update("<div></div>")
|
113 |
fac_b = gr.Textbox(value="",visible=False)
|
|
|
123 |
b4=out2.change(im_fn,[prompt,noise_level,h_variavel],[out3,], show_progress=True)
|
124 |
b5=out3.change(im_fn,[prompt,noise_level,h_variavel],[out4,], show_progress=True)
|
125 |
b6=out4.change(im_fn,[prompt,noise_level,h_variavel],[out5,], show_progress=True)
|
126 |
+
b7=out5.change(im_fn,[prompt,noise_level,h_variavel],[out6], show_progress=True)
|
127 |
+
b8=out6.change(noth,None,[message], show_progress=False)
|
128 |
+
b8=out6.change(zip_files,None,[caixa], show_progress=False)
|
129 |
swi=t_switch.change(clear,None,[t_switch,fac_b], cancels=[sta,b2,b3,b4,b5,b6,b7],show_progress=False)
|
130 |
#btn2.click(noth,None,message,cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
|
131 |
btn2.click(clear_all, None,[fac_b,prompt,out1,out2,out3,out4,out5,out6,t_state,t_switch,message],cancels=[b1,sta,b2,b3,b4,b5,b6,b7,b8,swi],show_progress=False)
|
132 |
# btn3.click(zip_files,None,[caixa],show_progress=False)
|
133 |
# caixa.change(noth,None,[message],show_progress=False)
|
134 |
b.queue(concurrency_count=100).launch(show_api=False)
|
135 |
+
build()
|