Fiqa commited on
Commit
98b9608
·
verified ·
1 Parent(s): 8bbdb99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -80,7 +80,8 @@ def generate_caption_and_image(image, f, p, d):
80
  out = model.generate(**inputs)
81
  caption1 = processor.decode(out[0], skip_special_tokens=True)
82
 
83
- prompt = (f"Create a visually stunning clothing item inspired by: 1. Primary Context: {caption1}, describing the mood and thematic elements of the image. 2. Secondary Insights: {caption2}, providing complementary attributes and textures. 3. Fabric: '{f}', highlighting its qualities. 4. Pattern: '{p}', enhancing visual harmony. 5. Design Style: '{d}', for a refined finish. Use a clean grey/white background with realistic lighting and intricate details for a polished presentation.")
 
84
 
85
 
86
 
@@ -92,7 +93,7 @@ def generate_caption_and_image(image, f, p, d):
92
  generated_image1 =pipe(prompt).images[0]
93
 
94
  return generated_image, generated_image1
95
-
96
  # Gradio UI
97
  iface = gr.Interface(
98
  fn=generate_caption_and_image,
 
80
  out = model.generate(**inputs)
81
  caption1 = processor.decode(out[0], skip_special_tokens=True)
82
 
83
+ prompt = f"Design a high-quality, stylish clothing item that seamlessly blends the essence of {caption1} and {caption2}. The design should prominently feature {fabric_texture} and incorporate {pattern}. The final piece should exude sophistication and creativity, suitable for modern trends while retaining an element of timeless appeal. Ensure the textures and patterns complement each other harmoniously, creating a visually striking yet wearable garment."
84
+ )
85
 
86
 
87
 
 
93
  generated_image1 =pipe(prompt).images[0]
94
 
95
  return generated_image, generated_image1
96
+ return None, None
97
  # Gradio UI
98
  iface = gr.Interface(
99
  fn=generate_caption_and_image,