Spaces:
Runtime error
Runtime error
Commit
·
3987eea
1
Parent(s):
dfa6507
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,8 @@ from PIL import Image
|
|
8 |
|
9 |
def t2i(text):
|
10 |
prompt_url = f"https://aadarsh-text-to-image-mymvubi2mq-el.a.run.app/t2i/{text}"
|
11 |
-
|
|
|
12 |
if response.status_code:
|
13 |
fp = open('image.png', 'wb')
|
14 |
fp.write(response.content)
|
|
|
8 |
|
9 |
def t2i(text):
|
10 |
prompt_url = f"https://aadarsh-text-to-image-mymvubi2mq-el.a.run.app/t2i/{text}"
|
11 |
+
img_url = requests.get(prompt_url).json()["url"]
|
12 |
+
response = requests.get(img_url)
|
13 |
if response.status_code:
|
14 |
fp = open('image.png', 'wb')
|
15 |
fp.write(response.content)
|