yangtb24 commited on
Commit
9d7a899
·
verified ·
1 Parent(s): 61c5c21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -842,7 +842,6 @@ def handsome_images_generations():
842
 
843
  if "stable-diffusion" in model_name or model_name in ["black-forest-labs/FLUX.1-schnell", "Pro/black-forest-labs/FLUX.1-schnell"]:
844
 
845
- # Initialize siliconflow_data with common parameters
846
  siliconflow_data = {
847
  "model": model_name,
848
  "prompt": data.get("prompt"),
@@ -850,7 +849,6 @@ def handsome_images_generations():
850
  "prompt_enhancement": data.get("prompt_enhancement", False),
851
  }
852
 
853
- # Add seed only if it's provided and valid
854
  seed = data.get("seed")
855
  if isinstance(seed, int) and 0 < seed < 9999999999:
856
  siliconflow_data["seed"] = seed
@@ -1212,7 +1210,7 @@ def handsome_chat_completions():
1212
  "index": 0,
1213
  "message": {
1214
  "role": "assistant",
1215
- "content": markdown_image_link if image_url else "Failed to generate image", # Directly return the URL in content
1216
  },
1217
  "finish_reason": "stop",
1218
  }
 
842
 
843
  if "stable-diffusion" in model_name or model_name in ["black-forest-labs/FLUX.1-schnell", "Pro/black-forest-labs/FLUX.1-schnell"]:
844
 
 
845
  siliconflow_data = {
846
  "model": model_name,
847
  "prompt": data.get("prompt"),
 
849
  "prompt_enhancement": data.get("prompt_enhancement", False),
850
  }
851
 
 
852
  seed = data.get("seed")
853
  if isinstance(seed, int) and 0 < seed < 9999999999:
854
  siliconflow_data["seed"] = seed
 
1210
  "index": 0,
1211
  "message": {
1212
  "role": "assistant",
1213
+ "content": markdown_image_link if image_url else "Failed to generate image",
1214
  },
1215
  "finish_reason": "stop",
1216
  }