Yw22 commited on
Commit
6979fc9
·
1 Parent(s): 1507e63
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -173,7 +173,6 @@ image_examples = [
173
  "a sea turtle gracefully swimming over a coral reef in the clear blue ocean.",
174
  "object",
175
  11318446767408804497,
176
- "",
177
  json.load(open("__asset__/trajs/object/turtle-1.json")),
178
  ],
179
 
@@ -181,7 +180,6 @@ image_examples = [
181
  "a red rose engulfed in flames.",
182
  "object",
183
  6854275249656120509,
184
- "",
185
  json.load(open("__asset__/trajs/object/rose-1.json")),
186
  ],
187
 
@@ -189,7 +187,6 @@ image_examples = [
189
  "intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.",
190
  "object",
191
  17966188172968903484,
192
- "HelloObject",
193
  json.load(open("__asset__/trajs/object/jellyfish-1.json")),
194
  ],
195
 
@@ -198,7 +195,6 @@ image_examples = [
198
  "detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.",
199
  "camera",
200
  7970487946960948963,
201
- "HelloObject",
202
  json.load(open("__asset__/trajs/camera/lush-1.json")),
203
  ],
204
 
@@ -206,7 +202,6 @@ image_examples = [
206
  "tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.",
207
  "camera",
208
  996953226890228361,
209
- "TUSUN",
210
  json.load(open("__asset__/trajs/camera/tusun-1.json")),
211
  ],
212
 
@@ -214,7 +209,6 @@ image_examples = [
214
  "A oil painting.",
215
  "camera",
216
  16867854766769816385,
217
- "",
218
  json.load(open("__asset__/trajs/camera/painting-1.json")),
219
  ],
220
 
@@ -549,8 +543,7 @@ with block as demo:
549
  model_length=16
550
  )
551
  first_frame_path = gr.State()
552
- tracking_points = gr.State([], label="points")
553
-
554
 
555
  with gr.Row():
556
  with gr.Column(scale=1):
@@ -624,8 +617,8 @@ with block as demo:
624
  # def process_example(input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path):
625
 
626
  # return input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path
627
- def process_example(input_image, prompt, drag_mode, seed, personalized, first_frame_path):
628
- return input_image, prompt, drag_mode, seed, personalized, first_frame_path
629
 
630
  # example = gr.Examples(
631
  # label="Input Example",
@@ -641,8 +634,8 @@ with block as demo:
641
  example = gr.Examples(
642
  label="Input Example",
643
  examples=image_examples,
644
- inputs=[input_image, prompt, drag_mode, seed, personalized, first_frame_path],
645
- outputs=[input_image, prompt, drag_mode, seed, personalized, first_frame_path],
646
  fn=process_example,
647
  run_on_click=True,
648
  examples_per_page=20,
 
173
  "a sea turtle gracefully swimming over a coral reef in the clear blue ocean.",
174
  "object",
175
  11318446767408804497,
 
176
  json.load(open("__asset__/trajs/object/turtle-1.json")),
177
  ],
178
 
 
180
  "a red rose engulfed in flames.",
181
  "object",
182
  6854275249656120509,
 
183
  json.load(open("__asset__/trajs/object/rose-1.json")),
184
  ],
185
 
 
187
  "intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.",
188
  "object",
189
  17966188172968903484,
 
190
  json.load(open("__asset__/trajs/object/jellyfish-1.json")),
191
  ],
192
 
 
195
  "detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.",
196
  "camera",
197
  7970487946960948963,
 
198
  json.load(open("__asset__/trajs/camera/lush-1.json")),
199
  ],
200
 
 
202
  "tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.",
203
  "camera",
204
  996953226890228361,
 
205
  json.load(open("__asset__/trajs/camera/tusun-1.json")),
206
  ],
207
 
 
209
  "A oil painting.",
210
  "camera",
211
  16867854766769816385,
 
212
  json.load(open("__asset__/trajs/camera/painting-1.json")),
213
  ],
214
 
 
543
  model_length=16
544
  )
545
  first_frame_path = gr.State()
546
+ tracking_points = gr.State([])
 
547
 
548
  with gr.Row():
549
  with gr.Column(scale=1):
 
617
  # def process_example(input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path):
618
 
619
  # return input_image, prompt, drag_mode, seed, personalized, tracking_points, first_frame_path
620
+ def process_example(input_image, prompt, drag_mode, seed, tracking_points):
621
+ return input_image, prompt, drag_mode, seed, tracking_points
622
 
623
  # example = gr.Examples(
624
  # label="Input Example",
 
634
  example = gr.Examples(
635
  label="Input Example",
636
  examples=image_examples,
637
+ inputs=[input_image, prompt, drag_mode, seed, personalized, tracking_points],
638
+ outputs=[input_image, prompt, drag_mode, seed, personalized, tracking_points],
639
  fn=process_example,
640
  run_on_click=True,
641
  examples_per_page=20,