Spaces:
Running
Running
osanseviero
commited on
Commit
Β·
ee6544b
1
Parent(s):
e00cbb6
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ with gr.Blocks(css=css) as demo:
|
|
39 |
gr.Markdown(
|
40 |
"""
|
41 |
## Stable Diffusion Perception ππ
|
42 |
-
|
43 |
"""
|
44 |
)
|
45 |
|
@@ -47,7 +47,7 @@ with gr.Blocks(css=css) as demo:
|
|
47 |
with gr.Column():
|
48 |
input_img = gr.Image(type="filepath")
|
49 |
with gr.Row():
|
50 |
-
see_prompts = gr.Button("Check how your image prompts your model!"
|
51 |
|
52 |
with gr.Column():
|
53 |
img2text_output = gr.Textbox(
|
@@ -56,17 +56,14 @@ with gr.Blocks(css=css) as demo:
|
|
56 |
elem_id="translated"
|
57 |
)
|
58 |
with gr.Row():
|
59 |
-
diffuse_btn = gr.Button(value="Diffuse it!"
|
60 |
with gr.Column():
|
61 |
-
sd_output = gr.Gallery().style(grid=2, height="auto"
|
62 |
with gr.Group(elem_id="share-btn-container"):
|
63 |
community_icon = gr.HTML(community_icon_html)
|
64 |
loading_icon = gr.HTML(loading_icon_html)
|
65 |
share_button = gr.Button("Share to community", elem_id="share-btn")
|
66 |
|
67 |
-
def translate_directly(img):
|
68 |
-
images = get_images(get_prompts(img))
|
69 |
-
return images
|
70 |
see_prompts.click(img_to_text,
|
71 |
inputs = input_img,
|
72 |
outputs = [
|
|
|
39 |
gr.Markdown(
|
40 |
"""
|
41 |
## Stable Diffusion Perception ππ
|
42 |
+
Want to figure out what a good prompt might be to create new images like an existing one. Use [CLIP Interrogator](https://huggingface.co/spaces/pharma/CLIP-Interrogator) to generate a prompt. Afterward, you can use Stable Diffusion to generate images based on the generated prompt.
|
43 |
"""
|
44 |
)
|
45 |
|
|
|
47 |
with gr.Column():
|
48 |
input_img = gr.Image(type="filepath")
|
49 |
with gr.Row():
|
50 |
+
see_prompts = gr.Button("Check how your image prompts your model!")
|
51 |
|
52 |
with gr.Column():
|
53 |
img2text_output = gr.Textbox(
|
|
|
56 |
elem_id="translated"
|
57 |
)
|
58 |
with gr.Row():
|
59 |
+
diffuse_btn = gr.Button(value="Diffuse it!")
|
60 |
with gr.Column():
|
61 |
+
sd_output = gr.Gallery().style(grid=2, height="auto")
|
62 |
with gr.Group(elem_id="share-btn-container"):
|
63 |
community_icon = gr.HTML(community_icon_html)
|
64 |
loading_icon = gr.HTML(loading_icon_html)
|
65 |
share_button = gr.Button("Share to community", elem_id="share-btn")
|
66 |
|
|
|
|
|
|
|
67 |
see_prompts.click(img_to_text,
|
68 |
inputs = input_img,
|
69 |
outputs = [
|