aiqcamp commited on
Commit
b03c39e
·
verified ·
1 Parent(s): 7e61fc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -20
app.py CHANGED
@@ -54,15 +54,8 @@ def load_generated_images():
54
  return image_files
55
 
56
  def load_predefined_images():
57
- predefined_images = [
58
- "assets/cm1.webp",
59
- "assets/cm2.webp",
60
- "assets/cm3.webp",
61
- "assets/cm4.webp",
62
- "assets/cm5.webp",
63
- "assets/cm6.webp",
64
- ]
65
- return predefined_images
66
 
67
  @spaces.GPU(duration=120)
68
  def inference(
@@ -96,6 +89,20 @@ def inference(
96
  # Return the image, seed, and updated gallery
97
  return image, seed, load_generated_images()
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  css = """
100
  footer {
101
  visibility: hidden;
@@ -103,7 +110,7 @@ footer {
103
  """
104
 
105
  with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, analytics_enabled=False) as demo:
106
- gr.HTML('<div class="title"> Claude Monet STUDIO </div>')
107
  gr.HTML('<div class="title">😄Image to Video Explore: <a href="https://huggingface.co/spaces/ginigen/theater" target="_blank">https://huggingface.co/spaces/ginigen/theater</a></div>')
108
 
109
  with gr.Tabs() as tabs:
@@ -171,7 +178,7 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, analytics_enabled=Fa
171
  )
172
 
173
  gr.Examples(
174
- examples=[],
175
  inputs=[prompt],
176
  outputs=[result, seed],
177
  )
@@ -188,15 +195,6 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, analytics_enabled=Fa
188
  )
189
  refresh_btn = gr.Button("🔄 Refresh Gallery")
190
 
191
- # Add sample gallery section at the bottom
192
- gr.Markdown("### Claude Monet Style Examples")
193
- predefined_gallery = gr.Gallery(
194
- label="Sample Images",
195
- columns=3,
196
- rows=2,
197
- show_label=False,
198
- value=load_predefined_images()
199
- )
200
 
201
  # Event handlers
202
  def refresh_gallery():
 
54
  return image_files
55
 
56
  def load_predefined_images():
57
+ # Return empty list since we're not using predefined images
58
+ return []
 
 
 
 
 
 
 
59
 
60
  @spaces.GPU(duration=120)
61
  def inference(
 
89
  # Return the image, seed, and updated gallery
90
  return image, seed, load_generated_images()
91
 
92
+ examples = [
93
+ "A young woman in a silk hanbok beneath cherry blossoms, wearing a jeogori in delicate peach silk with white diagonal lines, paired with a flowing chima in jade green. Her carefully wrapped hair is adorned with a silver binyeo catching the spring light. The hanbok's gentle movement mirrors the falling cherry petals, while the contrast between the soft peach top and vibrant green skirt creates a harmonious balance with the spring scenery. [trigger]",
94
+
95
+ "A noble lady in traditional hanbok beside a palace pond, dressed in a royal blue jeogori adorned with intricate gold embroidery of phoenixes. Her deep crimson chima sweeps gracefully across the weathered stone steps, its silk surface rippling like water in the autumn breeze. Traditional jewelry including a jade daenggi and gold norigae complete her elegant ensemble, catching the late afternoon sun. [trigger]",
96
+
97
+ "A bride in ceremonial wedding hanbok under moonlight, wearing a dynasty red jeogori embellished with golden symmetric patterns. Her voluminous purple chima, adorned with delicate silver-threaded flowers, creates a regal silhouette against the traditional wooden pavilion. The white collar and golden tasseled norigae sway gently as she moves, her face serene beneath the traditional jokduri headdress. [trigger]",
98
+
99
+ "A young musician in performance hanbok by a traditional gayageum, dressed in a snow-white jeogori with delicate embroidered plum blossoms. Her flowing indigo chima pools around her as she sits, the fabric's sheen changing with each movement. A single orchid ornament in her classic braid reflects her artistic refinement, while the hanbok's clean lines emphasize her graceful posture. [trigger]",
100
+
101
+ "A court lady in winter hanbok amid falling snow, wearing a deep forest green jeogori lined with fur at the cuffs. Her burgundy chima, padded for warmth, creates elegant swirls in the snow as she walks. Delicate golden-threaded patterns at her shoulders catch the winter light, while her carved jade binyeo holds her hair in a traditional style, completing the picture of winter elegance. [trigger]",
102
+
103
+ "A dancer in festival hanbok at sunset, wearing a vibrant yellow jeogori that seems to capture the golden hour light. Her twirling sapphire blue chima creates a mesmerizing display of movement and color, its silk surface reflecting the warm evening glow. Silver bangles and a coral daenggi add flashes of brilliance as she moves, the hanbok's traditional silhouette transformed into a dynamic celebration of color and motion. [trigger]"
104
+ ]
105
+
106
  css = """
107
  footer {
108
  visibility: hidden;
 
110
  """
111
 
112
  with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, analytics_enabled=False) as demo:
113
+ gr.HTML('<div class="title"> First CAT of Huggingface </div>')
114
  gr.HTML('<div class="title">😄Image to Video Explore: <a href="https://huggingface.co/spaces/ginigen/theater" target="_blank">https://huggingface.co/spaces/ginigen/theater</a></div>')
115
 
116
  with gr.Tabs() as tabs:
 
178
  )
179
 
180
  gr.Examples(
181
+ examples=examples,
182
  inputs=[prompt],
183
  outputs=[result, seed],
184
  )
 
195
  )
196
  refresh_btn = gr.Button("🔄 Refresh Gallery")
197
 
 
 
 
 
 
 
 
 
 
198
 
199
  # Event handlers
200
  def refresh_gallery():