Spaces:
Runtime error
Runtime error
update headings and details
Browse files
app.py
CHANGED
@@ -69,6 +69,23 @@ description = """<br><br><h4>Steps to build this pipeline:
|
|
69 |
- Generate Probabilities for images, choose the image with highest probability value and display it
|
70 |
</h4>"""
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
with gr.Blocks(theme=theme) as demo:
|
73 |
gr.HTML(title)
|
74 |
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/Effectively_Using_IF?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space to skip the queue and run in a private space</center>''')
|
@@ -80,9 +97,9 @@ with gr.Blocks(theme=theme) as demo:
|
|
80 |
b1 = gr.Button("Generate 'IF' Output").style(full_width=True)
|
81 |
with gr.Row(variant='compact'):
|
82 |
with gr.Column():
|
83 |
-
gallery_if = gr.Gallery(label='IF Space outputs', ).style(columns=4, object_fit="contain", preview=True)
|
84 |
b2 = gr.Button("Get the best generation using Pick-A-Pic")
|
85 |
-
image_picakapic = gr.Image(label="PickAPic Evaluated Output")
|
86 |
gr.Markdown(description)
|
87 |
b1.click(get_IF_op,[prompt, neg_prompt], gallery_if)
|
88 |
prompt.submit(get_IF_op,[prompt, neg_prompt], gallery_if)
|
|
|
69 |
- Generate Probabilities for images, choose the image with highest probability value and display it
|
70 |
</h4>"""
|
71 |
|
72 |
+
theme = gr.themes.Monochrome(
|
73 |
+
neutral_hue="cyan",
|
74 |
+
radius_size="md",
|
75 |
+
spacing_size="sm",)
|
76 |
+
|
77 |
+
title = """<h1 align="center">🔥Gradio pipeline to use DeepFloyd IF more effectively!</h1><br>
|
78 |
+
<h2 align="center">Demo build using <a href="https://huggingface.co/spaces/DeepFloyd/IF">DeeepFloyd IF</a> and <a href="https://huggingface.co/spaces/yuvalkirstain/PickScore">Pick-A-Pic PickScore</a> models.</h2>
|
79 |
+
<h2 align="center">💪💪Gradio-Client library allows you to use gradio demo for these two cutting edge models as API endpoints</h2>"""
|
80 |
+
description = """<br><br><h4>Steps to build this pipeline:
|
81 |
+
- Duplicate the Deepfloyd IF Space to avoid queue
|
82 |
+
- Create a Cient for this duplicated space using gradio python client
|
83 |
+
- Generate intial 4-image gallery using the client and a prompt
|
84 |
+
- Create a Client for PickScore Space using gradio python client
|
85 |
+
- Feed the image Gallery into PickScore client
|
86 |
+
- Generate Probabilities for images, choose the image with highest probability value and display it
|
87 |
+
</h4>"""
|
88 |
+
|
89 |
with gr.Blocks(theme=theme) as demo:
|
90 |
gr.HTML(title)
|
91 |
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/Effectively_Using_IF?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space to skip the queue and run in a private space</center>''')
|
|
|
97 |
b1 = gr.Button("Generate 'IF' Output").style(full_width=True)
|
98 |
with gr.Row(variant='compact'):
|
99 |
with gr.Column():
|
100 |
+
gallery_if = gr.Gallery(label='IF Space outputs', ).style(columns=4, object_fit="contain", preview=True, height='auto')
|
101 |
b2 = gr.Button("Get the best generation using Pick-A-Pic")
|
102 |
+
image_picakapic = gr.Image(label="PickAPic Evaluated Output").style(height=450)
|
103 |
gr.Markdown(description)
|
104 |
b1.click(get_IF_op,[prompt, neg_prompt], gallery_if)
|
105 |
prompt.submit(get_IF_op,[prompt, neg_prompt], gallery_if)
|