Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1189,7 +1189,16 @@ def generate_image_flux(prompt):
|
|
1189 |
num_inference_steps=4,
|
1190 |
api_name="/infer"
|
1191 |
)
|
1192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1193 |
|
1194 |
# Function to update images with the three prompts
|
1195 |
def update_images():
|
|
|
1189 |
num_inference_steps=4,
|
1190 |
api_name="/infer"
|
1191 |
)
|
1192 |
+
|
1193 |
+
# Assuming that the API response contains an image file or URL, extract the image part
|
1194 |
+
if isinstance(result, tuple):
|
1195 |
+
# Extract the image URL or path if it is a tuple
|
1196 |
+
image_path_or_url = result[0] # Adjust this index based on the actual structure of the response
|
1197 |
+
else:
|
1198 |
+
image_path_or_url = result
|
1199 |
+
|
1200 |
+
return image_path_or_url # Return the image path or URL directly
|
1201 |
+
|
1202 |
|
1203 |
# Function to update images with the three prompts
|
1204 |
def update_images():
|