Spaces:
Running
Running
Commit
·
ebb709a
1
Parent(s):
60be08d
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ from matplotlib import pyplot as plt
|
|
14 |
from torchvision import transforms
|
15 |
from diffusers import DiffusionPipeline
|
16 |
|
17 |
-
from share_btn import community_icon_html, loading_icon_html, share_js
|
18 |
|
19 |
HF_TOKEN_SD = os.environ.get('HF_TOKEN_SD') or True
|
20 |
|
@@ -101,13 +101,16 @@ with image_blocks as demo:
|
|
101 |
)
|
102 |
with gr.Column():
|
103 |
image_out = gr.Image(label="Output", elem_id="output-img").style(height=400)
|
|
|
104 |
with gr.Group(elem_id="share-btn-container"):
|
105 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
106 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
107 |
share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
|
|
|
108 |
|
109 |
|
110 |
-
btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
|
|
|
111 |
share_button.click(None, [], [], _js=share_js)
|
112 |
|
113 |
|
|
|
14 |
from torchvision import transforms
|
15 |
from diffusers import DiffusionPipeline
|
16 |
|
17 |
+
# from share_btn import community_icon_html, loading_icon_html, share_js
|
18 |
|
19 |
HF_TOKEN_SD = os.environ.get('HF_TOKEN_SD') or True
|
20 |
|
|
|
101 |
)
|
102 |
with gr.Column():
|
103 |
image_out = gr.Image(label="Output", elem_id="output-img").style(height=400)
|
104 |
+
'''
|
105 |
with gr.Group(elem_id="share-btn-container"):
|
106 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
107 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
108 |
share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
|
109 |
+
'''
|
110 |
|
111 |
|
112 |
+
# btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
|
113 |
+
btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out]) #, community_icon, loading_icon, share_button])
|
114 |
share_button.click(None, [], [], _js=share_js)
|
115 |
|
116 |
|