Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ model = MinDalle(
|
|
| 28 |
dtype=torch.float32
|
| 29 |
)
|
| 30 |
|
| 31 |
-
log_gpu_memory()
|
| 32 |
|
| 33 |
def run_model(
|
| 34 |
text: str,
|
|
@@ -83,7 +83,7 @@ def run_model(
|
|
| 83 |
is_verbose = True
|
| 84 |
)
|
| 85 |
|
| 86 |
-
log_gpu_memory()
|
| 87 |
|
| 88 |
ext = 'png' if bool(save_as_png) else 'jpg'
|
| 89 |
filename = filename_from_text(text)
|
|
@@ -159,22 +159,8 @@ with demo:
|
|
| 159 |
|
| 160 |
gradio.Examples(
|
| 161 |
examples=[
|
| 162 |
-
['
|
| 163 |
-
['
|
| 164 |
-
['Court sketch of Godzilla on trial', 5, 'examples/godzilla-trial.jpg'],
|
| 165 |
-
['lofi nuclear war to relax and study to', 5, 'examples/lofi-nuclear-war.jpg'],
|
| 166 |
-
['Karl Marx slimed at Kids Choice Awards', 4, 'examples/marx-slimed.jpg'],
|
| 167 |
-
['Scientists trying to rhyme orange with banana', 4, 'examples/scientists-rhyme.jpg'],
|
| 168 |
-
['Jesus turning water into wine on Americas Got Talent', 5, 'examples/jesus-talent.jpg'],
|
| 169 |
-
['Elmo in a street riot throwing a Molotov cocktail, hyperrealistic', 5, 'examples/elmo-riot.jpg'],
|
| 170 |
-
['Trail cam footage of gollum eating watermelon', 4, 'examples/gollum.jpg'],
|
| 171 |
-
['Funeral at Whole Foods', 4, 'examples/funeral-whole-foods.jpg'],
|
| 172 |
-
['Singularity, hyperrealism', 5, 'examples/singularity.jpg'],
|
| 173 |
-
['Astronaut riding a horse hyperrealistic', 5, 'examples/astronaut-horse.jpg'],
|
| 174 |
-
['An astronaut walking on Mars next to a Starship rocket, realistic', 5, 'examples/astronaut-mars.jpg'],
|
| 175 |
-
['Nuclear explosion broccoli', 4, 'examples/nuclear-broccoli.jpg'],
|
| 176 |
-
['Dali painting of WALL·E', 5, 'examples/dali-walle.jpg'],
|
| 177 |
-
['Cleopatra checking her iPhone', 4, 'examples/cleopatra-iphone.jpg'],
|
| 178 |
],
|
| 179 |
inputs=[
|
| 180 |
input_text,
|
|
@@ -200,10 +186,5 @@ with demo:
|
|
| 200 |
]
|
| 201 |
)
|
| 202 |
|
| 203 |
-
gradio.Markdown(
|
| 204 |
-
"""
|
| 205 |
-
### **[❤️ Sponsor](https://github.com/sponsors/kuprel)**
|
| 206 |
-
"""
|
| 207 |
-
)
|
| 208 |
|
| 209 |
demo.launch()
|
|
|
|
| 28 |
dtype=torch.float32
|
| 29 |
)
|
| 30 |
|
| 31 |
+
## log_gpu_memory()
|
| 32 |
|
| 33 |
def run_model(
|
| 34 |
text: str,
|
|
|
|
| 83 |
is_verbose = True
|
| 84 |
)
|
| 85 |
|
| 86 |
+
## log_gpu_memory()
|
| 87 |
|
| 88 |
ext = 'png' if bool(save_as_png) else 'jpg'
|
| 89 |
filename = filename_from_text(text)
|
|
|
|
| 159 |
|
| 160 |
gradio.Examples(
|
| 161 |
examples=[
|
| 162 |
+
['A white cat with golden sunglasses on, pink background, studio lighting, 4k, award winning photography', 2, 'examples/cat.png'],
|
| 163 |
+
['an astronaut dancing on the moon’s surface, close-up photo', 2, 'examples/astronaut.png'],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
],
|
| 165 |
inputs=[
|
| 166 |
input_text,
|
|
|
|
| 186 |
]
|
| 187 |
)
|
| 188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
|
| 190 |
demo.launch()
|