Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -95,8 +95,8 @@ def query(payload, max_retries=5):
|
|
| 95 |
return None
|
| 96 |
|
| 97 |
# Function for direct prompt to image generation
|
| 98 |
-
def
|
| 99 |
-
|
| 100 |
|
| 101 |
if image_bytes is None:
|
| 102 |
error_img = Image.new('RGB', (300, 300), color=(255, 0, 0))
|
|
|
|
| 95 |
return None
|
| 96 |
|
| 97 |
# Function for direct prompt to image generation
|
| 98 |
+
def generate_image(prompt):
|
| 99 |
+
image_bytes = query({"inputs": prompt})
|
| 100 |
|
| 101 |
if image_bytes is None:
|
| 102 |
error_img = Image.new('RGB', (300, 300), color=(255, 0, 0))
|