Spaces:
Runtime error
Runtime error
LeoXing1996
commited on
Commit
•
4109acf
1
Parent(s):
58ba106
debug example
Browse files- README.md +1 -1
- app-example-debug.py +142 -0
README.md
CHANGED
@@ -5,6 +5,6 @@ colorFrom: yellow
|
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
sdk_version: 4.7.1
|
8 |
-
app_file: app-
|
9 |
pinned: false
|
10 |
---
|
|
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
sdk_version: 4.7.1
|
8 |
+
app_file: app-example-debug.py
|
9 |
pinned: false
|
10 |
---
|
app-example-debug.py
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
|
4 |
+
with gr.Blocks() as demo:
|
5 |
+
|
6 |
+
init_img = gr.Image()
|
7 |
+
def create_example(input_list):
|
8 |
+
return gr.Examples(
|
9 |
+
examples=input_list,
|
10 |
+
inputs=[
|
11 |
+
init_img,
|
12 |
+
],
|
13 |
+
)
|
14 |
+
|
15 |
+
create_example(
|
16 |
+
[
|
17 |
+
[
|
18 |
+
'./__assets__/image_animation/yiming/yiming.jpeg',
|
19 |
+
'./__assets__/image_animation/yiming/yiming.mp4',
|
20 |
+
'1boy in Christmas suit, lift a Christmas gift',
|
21 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
22 |
+
'3d_cartoon',
|
23 |
+
2,
|
24 |
+
],
|
25 |
+
[
|
26 |
+
'./__assets__/image_animation/yanhong/yanhong.png',
|
27 |
+
'./__assets__/image_animation/yanhong/yanhong.mp4',
|
28 |
+
'1girl lift a Christmas gift',
|
29 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
30 |
+
'3d_cartoon',
|
31 |
+
2,
|
32 |
+
],
|
33 |
+
],
|
34 |
+
|
35 |
+
)
|
36 |
+
|
37 |
+
with gr.Accordion('More Examples for Style Transfer', open=False):
|
38 |
+
create_example([
|
39 |
+
[
|
40 |
+
|
41 |
+
'./__assets__/image_animation/style_transfer/anya/anya.jpg',
|
42 |
+
'./__assets__/image_animation/style_transfer/anya/2.mp4',
|
43 |
+
'1girl open mouth ',
|
44 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
45 |
+
'3d_cartoon',
|
46 |
+
3,
|
47 |
+
],
|
48 |
+
[
|
49 |
+
'./__assets__/image_animation/magnitude/genshin/genshin.jpg',
|
50 |
+
'./__assets__/image_animation/magnitude/genshin/3.mp4',
|
51 |
+
'cherry blossoms in the wind, raidenshogundef, yaemikodef, best quality, 4k',
|
52 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
53 |
+
'3d_cartoon',
|
54 |
+
3,
|
55 |
+
],
|
56 |
+
|
57 |
+
])
|
58 |
+
|
59 |
+
with gr.Accordion('More Examples for Prompt Changing', open=False):
|
60 |
+
create_example(
|
61 |
+
[
|
62 |
+
[
|
63 |
+
'./__assets__/image_animation/real/lighthouse.jpg',
|
64 |
+
'./__assets__/image_animation/real/1.mp4',
|
65 |
+
'lightning, lighthouse',
|
66 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
67 |
+
'realistic',
|
68 |
+
1,
|
69 |
+
],
|
70 |
+
[
|
71 |
+
'./__assets__/image_animation/real/lighthouse.jpg',
|
72 |
+
'./__assets__/image_animation/real/2.mp4',
|
73 |
+
'sun rising, lighthouse',
|
74 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
75 |
+
'realistic',
|
76 |
+
1,
|
77 |
+
],
|
78 |
+
[
|
79 |
+
'./__assets__/image_animation/real/lighthouse.jpg',
|
80 |
+
'./__assets__/image_animation/real/3.mp4',
|
81 |
+
'fireworks, lighthouse',
|
82 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
83 |
+
'realistic',
|
84 |
+
1,
|
85 |
+
],
|
86 |
+
[
|
87 |
+
'./__assets__/image_animation/rcnz/harry.png',
|
88 |
+
'./__assets__/image_animation/rcnz/1.mp4',
|
89 |
+
'1boy smiling',
|
90 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
91 |
+
'3d_cartoon',
|
92 |
+
2
|
93 |
+
],
|
94 |
+
[
|
95 |
+
'./__assets__/image_animation/rcnz/harry.png',
|
96 |
+
'./__assets__/image_animation/rcnz/2.mp4',
|
97 |
+
'1boy playing magic fire',
|
98 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
99 |
+
'3d_cartoon',
|
100 |
+
2
|
101 |
+
],
|
102 |
+
[
|
103 |
+
'./__assets__/image_animation/rcnz/harry.png',
|
104 |
+
'./__assets__/image_animation/rcnz/3.mp4',
|
105 |
+
'1boy is waving hands',
|
106 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
107 |
+
'3d_cartoon',
|
108 |
+
2
|
109 |
+
]
|
110 |
+
])
|
111 |
+
|
112 |
+
with gr.Accordion('Examples for Motion Magnitude', open=False):
|
113 |
+
create_example(
|
114 |
+
[
|
115 |
+
[
|
116 |
+
'./__assets__/image_animation/magnitude/labrador.png',
|
117 |
+
'./__assets__/image_animation/magnitude/1.mp4',
|
118 |
+
'cherry blossoms in the wind, raidenshogundef, yaemikodef, best quality, 4k',
|
119 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
120 |
+
'3d_cartoon',
|
121 |
+
1,
|
122 |
+
],
|
123 |
+
[
|
124 |
+
'./__assets__/image_animation/magnitude/labrador.png',
|
125 |
+
'./__assets__/image_animation/magnitude/2.mp4',
|
126 |
+
'cherry blossoms in the wind, raidenshogundef, yaemikodef, best quality, 4k',
|
127 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
128 |
+
'3d_cartoon',
|
129 |
+
2,
|
130 |
+
],
|
131 |
+
[
|
132 |
+
'./__assets__/image_animation/magnitude/labrador.png',
|
133 |
+
'./__assets__/image_animation/magnitude/3.mp4',
|
134 |
+
'cherry blossoms in the wind, raidenshogundef, yaemikodef, best quality, 4k',
|
135 |
+
'wrong white balance, dark, sketches,worst quality,low quality, deformed, distorted, disfigured, bad eyes, wrong lips,weird mouth, bad teeth, mutated hands and fingers, bad anatomy,wrong anatomy, amputation, extra limb, missing limb, floating,limbs, disconnected limbs, mutation, ugly, disgusting, bad_pictures, negative_hand-neg',
|
136 |
+
'3d_cartoon',
|
137 |
+
3,
|
138 |
+
]
|
139 |
+
])
|
140 |
+
|
141 |
+
|
142 |
+
demo.launch()
|