Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,15 +3,6 @@ import os
|
|
3 |
os.system("git clone --recursive https://github.com/JD-P/cloob-latent-diffusion")
|
4 |
os.system("cd cloob-latent-diffusion;pip install omegaconf pillow pytorch-lightning einops wandb ftfy regex ./CLIP")
|
5 |
|
6 |
-
# setup some example images
|
7 |
-
#examples = []
|
8 |
-
#EXAMPLES_DIR = 'examples'
|
9 |
-
#DEFAULT_PROMPT = "<image>"
|
10 |
-
#if os.path.isdir(EXAMPLES_DIR):
|
11 |
-
# for file in os.listdir(EXAMPLES_DIR):
|
12 |
-
# path = EXAMPLES_DIR + "/" + file
|
13 |
-
# examples.append([path, DEFAULT_PROMPT])
|
14 |
-
|
15 |
import argparse
|
16 |
from functools import partial
|
17 |
from pathlib import Path
|
@@ -167,7 +158,7 @@ def gen_ims(prompt, im_prompt=None, seed=None, n_steps=10, method='plms'):
|
|
167 |
iface = gr.Interface(fn=gen_ims,
|
168 |
inputs=[#gr.inputs.Slider(minimum=1, maximum=1, step=1, default=1,label="Number of images"),
|
169 |
#gr.inputs.Slider(minimum=0, maximum=200, step=1, label='Random seed', default=0),
|
170 |
-
gr.inputs.Textbox(
|
171 |
gr.inputs.Image(optional=True, label="Image prompt", type='filepath'),
|
172 |
#gr.inputs.Slider(minimum=10, maximum=35, step=1, default=15,label="Number of steps")
|
173 |
],
|
|
|
3 |
os.system("git clone --recursive https://github.com/JD-P/cloob-latent-diffusion")
|
4 |
os.system("cd cloob-latent-diffusion;pip install omegaconf pillow pytorch-lightning einops wandb ftfy regex ./CLIP")
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
import argparse
|
7 |
from functools import partial
|
8 |
from pathlib import Path
|
|
|
158 |
iface = gr.Interface(fn=gen_ims,
|
159 |
inputs=[#gr.inputs.Slider(minimum=1, maximum=1, step=1, default=1,label="Number of images"),
|
160 |
#gr.inputs.Slider(minimum=0, maximum=200, step=1, label='Random seed', default=0),
|
161 |
+
gr.inputs.Textbox(label="Text prompt"),
|
162 |
gr.inputs.Image(optional=True, label="Image prompt", type='filepath'),
|
163 |
#gr.inputs.Slider(minimum=10, maximum=35, step=1, default=15,label="Number of steps")
|
164 |
],
|