Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
·
156d86f
1
Parent(s):
d57bf64
debug
Browse files
app.py
CHANGED
|
@@ -131,6 +131,29 @@ def desc_to_image_dalle(desc):
|
|
| 131 |
print(f"result is: {result}")
|
| 132 |
return result[0]
|
| 133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
demo = gr.Blocks()
|
| 135 |
|
| 136 |
with demo:
|
|
@@ -162,7 +185,7 @@ with demo:
|
|
| 162 |
b0.click(npc_randomize,inputs=[],outputs=[input_name,input_race,input_class,input_pronoun])
|
| 163 |
b1.click(npc_generate, inputs=[ input_name,input_race,input_class,input_pronoun], outputs=desc_txt)
|
| 164 |
b2.click(desc_to_image, desc_txt, output_image)
|
| 165 |
-
b3.click(
|
| 166 |
#examples=examples
|
| 167 |
|
| 168 |
demo.launch(enable_queue=True, debug=True)
|
|
|
|
| 131 |
print(f"result is: {result}")
|
| 132 |
return result[0]
|
| 133 |
|
| 134 |
+
|
| 135 |
+
def desc_to_image_cf(desc):
|
| 136 |
+
cf = gr.Interface.load("spaces/Gradio-Blocks/clip-guided-faces")
|
| 137 |
+
|
| 138 |
+
print("about to die",cf)
|
| 139 |
+
|
| 140 |
+
text=desc
|
| 141 |
+
init_image=None
|
| 142 |
+
skip_timesteps=0
|
| 143 |
+
clip_guidance_scale=600
|
| 144 |
+
tv_scale=0
|
| 145 |
+
range_scale=0
|
| 146 |
+
init_scale=0
|
| 147 |
+
seed=0
|
| 148 |
+
image_prompts=None
|
| 149 |
+
timestep_respacing= 25
|
| 150 |
+
cutn=16
|
| 151 |
+
im_prompt_weight =1
|
| 152 |
+
result = cf.fns[0].fn(text, init_image, skip_timesteps, clip_guidance_scale, tv_scale, range_scale, init_scale, seed, image_prompts,timestep_respacing, cutn, im_prompt_weight)
|
| 153 |
+
|
| 154 |
+
return result[0]
|
| 155 |
+
|
| 156 |
+
|
| 157 |
demo = gr.Blocks()
|
| 158 |
|
| 159 |
with demo:
|
|
|
|
| 185 |
b0.click(npc_randomize,inputs=[],outputs=[input_name,input_race,input_class,input_pronoun])
|
| 186 |
b1.click(npc_generate, inputs=[ input_name,input_race,input_class,input_pronoun], outputs=desc_txt)
|
| 187 |
b2.click(desc_to_image, desc_txt, output_image)
|
| 188 |
+
b3.click(desc_to_image_cf, desc_txt, output_image)
|
| 189 |
#examples=examples
|
| 190 |
|
| 191 |
demo.launch(enable_queue=True, debug=True)
|