ifmain commited on
Commit
e3512e3
·
verified ·
1 Parent(s): 2a08ced

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -49
app.py CHANGED
@@ -67,50 +67,10 @@ def infer(
67
 
68
  # Полные примеры с различными стилями и условиями съемки
69
  full_examples = [
70
- [
71
- "d1g1cam, amateur photo, low-lit, Low-resolution photo, shot on a mobile phone, nighttime, noticeable noise in dark areas. "
72
- "Young woman, late 20s, casually dressed in an oversized pink T-shirt, outdoors, her gaze directed to the side, sad expression, holding a cup of coffee. "
73
- "Her blonde hair is loosely tied back. Her face partially shadowed, minimal makeup visible. She is standing on the street near Soviet-era storey buildings, trees, parked cars nearby. "
74
- "Dull, overcast lighting.",
75
- 732, # Seed
76
- False, # Randomize seed
77
- 1024, # Width
78
- 1024, # Height
79
- 3.5, # Guidance scale
80
- 28 # Number of inference steps
81
- ],
82
- [
83
- "v8s, Dimly lit photo, grungy aesthetic, gritty urban, Los Angeles city on background, interior of muscle car driving at high speed. "
84
- "Amateur quality, nighttime, in motion, smeared background, headlights glowing, noise and grain film. "
85
- "Glowing dashboard where speedometer is blurred, rearview mirror, woman's hand with black nail polish on steering wheel. "
86
- "First-person perspective, wide-angle GoPro lens.",
87
- 1234, # Seed
88
- False, # Randomize seed
89
- 1280, # Width
90
- 1024, # Height
91
- 4.0, # Guidance scale
92
- 30 # Number of inference steps
93
- ],
94
- [
95
- "35mm film photo, high contrast, cinematic lighting, mid-20s man with messy dark hair and a leather jacket, standing under neon lights. "
96
- "Rainy evening, water reflections on pavement, vibrant pink and blue lighting from nearby signs. "
97
- "Captured on Kodak Portra 400, subtle grain, warm skin tones, dramatic depth of field.",
98
- 5678,
99
- True, # Enable random seed
100
- 1024,
101
- 1536,
102
- 4.2,
103
- 32
104
- ],
105
- [
106
- "Vintage Polaroid, warm and faded colors, soft focus. A child playing in a sunflower field, early morning sunlight filtering through the leaves, a dreamy nostalgic atmosphere.",
107
- 2468,
108
- False,
109
- 768,
110
- 1024,
111
- 3.8,
112
- 25
113
- ]
114
  ]
115
 
116
  css = """
@@ -192,11 +152,11 @@ with gr.Blocks(css=css) as demo:
192
  )
193
 
194
  gr.Examples(
195
- examples=full_examples,
196
- fn=infer,
197
- inputs=[prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
198
- outputs=[result, seed],
199
- cache_examples=False
200
  )
201
 
202
  gr.on(
 
67
 
68
  # Полные примеры с различными стилями и условиями съемки
69
  full_examples = [
70
+ ["d1g1cam, amateur photo, low-lit, Young woman, late 20s, casually dressed in an oversized pink T-shirt, outdoors, her gaze directed to the side, sad expression."],
71
+ ["v8s, Dimly lit photo, grungy aesthetic, gritty urban, Los Angeles city on background, interior of muscle car driving at high speed, first-person perspective."],
72
+ ["35mm film photo, high contrast, cinematic lighting, mid-20s man with messy dark hair and a leather jacket, standing under neon lights, rainy evening, water reflections on pavement."],
73
+ ["Vintage Polaroid, warm and faded colors, soft focus. A child playing in a sunflower field, early morning sunlight filtering through the leaves, a dreamy nostalgic atmosphere."]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  ]
75
 
76
  css = """
 
152
  )
153
 
154
  gr.Examples(
155
+ examples=full_examples,
156
+ fn=infer,
157
+ inputs=[prompt], # Теперь передаём только prompt
158
+ outputs=[result],
159
+ cache_examples=False
160
  )
161
 
162
  gr.on(