Spaces:
Runtime error
Runtime error
Commit ·
7c8e9f9
1
Parent(s): 2a3532a
Update app.py
Browse files
app.py
CHANGED
|
@@ -236,6 +236,14 @@ def generate_image(prompt):
|
|
| 236 |
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTC-JteC4ZshI0GI7fqh7WfHnglxeef9B7eaG3F9cysviki42Pv1byvpCKWfw&s"
|
| 237 |
]
|
| 238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
|
| 240 |
if "face" in prompt:
|
| 241 |
output_url = random.choice(faces)
|
|
@@ -291,6 +299,8 @@ def generate_image(prompt):
|
|
| 291 |
output_url = random.choice(rainbow)
|
| 292 |
elif "rain" in prompt:
|
| 293 |
output_url = random.choice(rain)
|
|
|
|
|
|
|
| 294 |
else:
|
| 295 |
return "No image generated."
|
| 296 |
image = load_image(output_url)
|
|
|
|
| 236 |
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTC-JteC4ZshI0GI7fqh7WfHnglxeef9B7eaG3F9cysviki42Pv1byvpCKWfw&s"
|
| 237 |
]
|
| 238 |
|
| 239 |
+
future = [
|
| 240 |
+
"https://img.freepik.com/free-photo/city-with-moon-sky_188544-8835.jpg?size=626&ext=jpg",
|
| 241 |
+
"https://img.freepik.com/free-photo/3d-rendering-planet-mars-broadband-internet-system-meet-needs-consumers_181624-56885.jpg?size=626&ext=jpg",
|
| 242 |
+
"https://img.freepik.com/free-photo/person-holding-clear-crystal-glass-ball-with-reflection-building_181624-4779.jpg?size=626&ext=jpg",
|
| 243 |
+
"https://img.freepik.com/free-photo/digital-world-banner-background-remixed-from-public-domain-by-nasa_53876-124622.jpg?size=626&ext=jpg",
|
| 244 |
+
"https://img.freepik.com/free-photo/3d-view-planet-earth_23-2150499242.jpg?size=626&ext=jpg"
|
| 245 |
+
]
|
| 246 |
+
|
| 247 |
|
| 248 |
if "face" in prompt:
|
| 249 |
output_url = random.choice(faces)
|
|
|
|
| 299 |
output_url = random.choice(rainbow)
|
| 300 |
elif "rain" in prompt:
|
| 301 |
output_url = random.choice(rain)
|
| 302 |
+
elif "future" in prompt:
|
| 303 |
+
output_url = random.choice(future)
|
| 304 |
else:
|
| 305 |
return "No image generated."
|
| 306 |
image = load_image(output_url)
|