Pijush2023 commited on
Commit
7ee5252
·
verified ·
1 Parent(s): 73a3b01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -1189,7 +1189,16 @@ def generate_image_flux(prompt):
1189
  num_inference_steps=4,
1190
  api_name="/infer"
1191
  )
1192
- return result
 
 
 
 
 
 
 
 
 
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():