Spaces:
Runtime error
Runtime error
Commit
·
8f70438
1
Parent(s):
b9204f5
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,11 @@ import requests
|
|
4 |
from io import BytesIO
|
5 |
import random
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
def generate_image(prompt):
|
8 |
faces = [
|
9 |
"https://avatars.mds.yandex.net/i?id=f9676dc9c99572353c509d298a0b9f6571edca4e-10514707-images-thumbs&n=13",
|
|
|
4 |
from io import BytesIO
|
5 |
import random
|
6 |
|
7 |
+
def load_image(url):
|
8 |
+
response = requests.get(url)
|
9 |
+
image = Image.open(BytesIO(response.content))
|
10 |
+
return image
|
11 |
+
|
12 |
def generate_image(prompt):
|
13 |
faces = [
|
14 |
"https://avatars.mds.yandex.net/i?id=f9676dc9c99572353c509d298a0b9f6571edca4e-10514707-images-thumbs&n=13",
|