Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,8 @@ import gradio as gr
|
|
3 |
proc1 = gr.Interface.load("models/prompthero/funko-diffusion",live=True,preprocess=True, postprocess=False)
|
4 |
|
5 |
def send_it1(inputs,proc1=proc1):
|
6 |
-
output1=proc1(inputs)
|
|
|
7 |
return output1
|
8 |
|
9 |
with gr.Blocks() as myface:
|
@@ -29,11 +30,9 @@ with gr.Blocks() as myface:
|
|
29 |
full_width=False,
|
30 |
)
|
31 |
|
32 |
-
|
33 |
-
label="Generated images", show_label=False, elem_id="gallery"
|
34 |
-
).style(grid=[2], height="auto")
|
35 |
|
36 |
-
btn.click(send_it1, inputs=[text], outputs=
|
37 |
|
38 |
if __name__ == "__main__":
|
39 |
myface.launch()
|
|
|
3 |
proc1 = gr.Interface.load("models/prompthero/funko-diffusion",live=True,preprocess=True, postprocess=False)
|
4 |
|
5 |
def send_it1(inputs,proc1=proc1):
|
6 |
+
output1= await proc1(inputs)
|
7 |
+
print(output1)
|
8 |
return output1
|
9 |
|
10 |
with gr.Blocks() as myface:
|
|
|
30 |
full_width=False,
|
31 |
)
|
32 |
|
33 |
+
|
|
|
|
|
34 |
|
35 |
+
btn.click(send_it1, inputs=[text], outputs=gr.outputs.Image(type="auto", label="Generated Image"), postprocess=False, api_name="text")
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
myface.launch()
|