Spaces:
Runtime error
Runtime error
Commit
·
008ee5b
1
Parent(s):
452f3ca
Update app.py
Browse files
app.py
CHANGED
@@ -172,67 +172,70 @@ def generate_image(prompt):
|
|
172 |
]
|
173 |
|
174 |
if "face" in prompt:
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
236 |
|
237 |
iface = gr.Interface(
|
238 |
fn=generate_image,
|
|
|
172 |
]
|
173 |
|
174 |
if "face" in prompt:
|
175 |
+
output = random.choice(faces)
|
176 |
+
return output
|
177 |
+
elif "landscape" in prompt:
|
178 |
+
output = random.choice(landscapes)
|
179 |
+
return output
|
180 |
+
elif "animal" in prompt:
|
181 |
+
output = random.choice(animal)
|
182 |
+
return output
|
183 |
+
elif "car" in prompt:
|
184 |
+
output = random.choice(car)
|
185 |
+
return output
|
186 |
+
elif "food" in prompt:
|
187 |
+
output = random.choice(food)
|
188 |
+
return output
|
189 |
+
elif "boat" in prompt:
|
190 |
+
output = random.choice(boat)
|
191 |
+
return output
|
192 |
+
elif "logo" in prompt:
|
193 |
+
output = random.choice(logo)
|
194 |
+
return output
|
195 |
+
elif "eye" in prompt:
|
196 |
+
output = random.choice(eye)
|
197 |
+
return output
|
198 |
+
elif "food" in prompt:
|
199 |
+
output = random.choice(food)
|
200 |
+
return output
|
201 |
+
elif "beard" in prompt:
|
202 |
+
output = random.choice(beard)
|
203 |
+
return output
|
204 |
+
elif "avatar" in prompt:
|
205 |
+
output = random.choice(avatar)
|
206 |
+
return output
|
207 |
+
elif "dreadlocks" in prompt:
|
208 |
+
output = random.choice(dreadlocks)
|
209 |
+
return output
|
210 |
+
elif "soap" in prompt:
|
211 |
+
output = random.choice(soap)
|
212 |
+
return output
|
213 |
+
elif "sumsung" in prompt:
|
214 |
+
output = random.choice(sumsung)
|
215 |
+
return output
|
216 |
+
elif "iphone" in prompt:
|
217 |
+
output = random.choice(iphone)
|
218 |
+
return output
|
219 |
+
elif "phone" in prompt:
|
220 |
+
output = random.choice(phone)
|
221 |
+
return output
|
222 |
+
elif "code" in prompt:
|
223 |
+
output = random.choice(code)
|
224 |
+
return output
|
225 |
+
elif "youtube" in prompt:
|
226 |
+
output = random.choice(ytlogo)
|
227 |
+
return output
|
228 |
+
elif "dog" in prompt:
|
229 |
+
output = random.choice(dog)
|
230 |
+
return output
|
231 |
+
elif "doll" in prompt:
|
232 |
+
output = random.choice(doll)
|
233 |
+
return output
|
234 |
+
elif "background" in prompt:
|
235 |
+
output = random.choice(background)
|
236 |
+
return output
|
237 |
+
else:
|
238 |
+
return "No image generated."
|
239 |
|
240 |
iface = gr.Interface(
|
241 |
fn=generate_image,
|