Spaces:
Runtime error
Runtime error
Commit
·
cb9a9ef
1
Parent(s):
41b9a95
Update app.py
Browse files
app.py
CHANGED
@@ -5,15 +5,15 @@ from PIL import Image
|
|
5 |
import io
|
6 |
|
7 |
def generate_image(prompt):
|
8 |
-
url = "https://46dc2628-cfb9-4837-b979-2dd9940ee82e.id.repl.co/generate_image?prompt="+prompt
|
9 |
-
response = requests.get(url, timeout=999)
|
10 |
-
data = response.json()
|
11 |
-
base64_image = data["image"]
|
12 |
|
13 |
# Decode the base64 image data
|
14 |
-
image_data = base64.b64decode(base64_image)
|
15 |
image = Image.open("https://www.general-plastics.com/wp-content/uploads/2022/12/we-are-currently-updating-our-web-site-check-back-soon-300x225.jpg")
|
16 |
-
image = Image.open(io.BytesIO(image_data))
|
17 |
|
18 |
return image
|
19 |
|
|
|
5 |
import io
|
6 |
|
7 |
def generate_image(prompt):
|
8 |
+
#url = "https://46dc2628-cfb9-4837-b979-2dd9940ee82e.id.repl.co/generate_image?prompt="+prompt
|
9 |
+
#response = requests.get(url, timeout=999)
|
10 |
+
#data = response.json()
|
11 |
+
#base64_image = data["image"]
|
12 |
|
13 |
# Decode the base64 image data
|
14 |
+
#image_data = base64.b64decode(base64_image)
|
15 |
image = Image.open("https://www.general-plastics.com/wp-content/uploads/2022/12/we-are-currently-updating-our-web-site-check-back-soon-300x225.jpg")
|
16 |
+
#image = Image.open(io.BytesIO(image_data))
|
17 |
|
18 |
return image
|
19 |
|