Spaces:
Runtime error
Runtime error
Fix the description for sample images
Browse files
app.py
CHANGED
@@ -21,8 +21,12 @@ def get_sample_image_url(file_name: str) -> str:
|
|
21 |
def get_sample_image_markdown(name: str) -> str:
|
22 |
model_name = name.split()[0]
|
23 |
if name == 'ddpm-128-exp000 (DDPM)':
|
|
|
|
|
24 |
file_name = f'{model_name}.png'
|
25 |
elif name == 'ddpm-128-exp000 (DDIM, 20 steps)':
|
|
|
|
|
26 |
file_name = f'{model_name}-ddim-20steps.png'
|
27 |
else:
|
28 |
raise ValueError
|
@@ -30,7 +34,8 @@ def get_sample_image_markdown(name: str) -> str:
|
|
30 |
text = f'''
|
31 |
- size: 128x128
|
32 |
- seed: 0-99
|
33 |
-
- scheduler:
|
|
|
34 |
|
35 |
![sample images]({url})'''
|
36 |
return text
|
|
|
21 |
def get_sample_image_markdown(name: str) -> str:
|
22 |
model_name = name.split()[0]
|
23 |
if name == 'ddpm-128-exp000 (DDPM)':
|
24 |
+
scheduler = 'DDPM'
|
25 |
+
steps = 1000
|
26 |
file_name = f'{model_name}.png'
|
27 |
elif name == 'ddpm-128-exp000 (DDIM, 20 steps)':
|
28 |
+
scheduler = 'DDIM'
|
29 |
+
steps = 20
|
30 |
file_name = f'{model_name}-ddim-20steps.png'
|
31 |
else:
|
32 |
raise ValueError
|
|
|
34 |
text = f'''
|
35 |
- size: 128x128
|
36 |
- seed: 0-99
|
37 |
+
- scheduler: {scheduler}
|
38 |
+
- steps: {steps}
|
39 |
|
40 |
![sample images]({url})'''
|
41 |
return text
|