Add examples
Browse files
app.py
CHANGED
|
@@ -52,9 +52,14 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 52 |
with gr.Column():
|
| 53 |
with gr.Box():
|
| 54 |
reload_button = gr.Button('Reload Model List')
|
| 55 |
-
model_id = gr.Dropdown(
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
with gr.Accordion(
|
| 59 |
label=
|
| 60 |
'Model info (Base model and prompt used for training)',
|
|
@@ -102,6 +107,111 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 102 |
''')
|
| 103 |
with gr.Column():
|
| 104 |
result = gr.Video(label='Result')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
reload_button.click(fn=app.reload_model_list_and_update_model_info,
|
| 107 |
inputs=None,
|
|
|
|
| 52 |
with gr.Column():
|
| 53 |
with gr.Box():
|
| 54 |
reload_button = gr.Button('Reload Model List')
|
| 55 |
+
model_id = gr.Dropdown(
|
| 56 |
+
label='Model ID',
|
| 57 |
+
choices=[
|
| 58 |
+
'Tune-A-Video-library/a-man-is-surfing',
|
| 59 |
+
'Tune-A-Video-library/mo-di-bear-guitar',
|
| 60 |
+
'Tune-A-Video-library/redshift-man-skiing',
|
| 61 |
+
],
|
| 62 |
+
value='Tune-A-Video-library/a-man-is-surfing')
|
| 63 |
with gr.Accordion(
|
| 64 |
label=
|
| 65 |
'Model info (Base model and prompt used for training)',
|
|
|
|
| 107 |
''')
|
| 108 |
with gr.Column():
|
| 109 |
result = gr.Video(label='Result')
|
| 110 |
+
with gr.Row():
|
| 111 |
+
examples = [
|
| 112 |
+
[
|
| 113 |
+
'Tune-A-Video-library/a-man-is-surfing',
|
| 114 |
+
'A panda is surfing.',
|
| 115 |
+
8,
|
| 116 |
+
1,
|
| 117 |
+
3,
|
| 118 |
+
50,
|
| 119 |
+
7.5,
|
| 120 |
+
],
|
| 121 |
+
[
|
| 122 |
+
'Tune-A-Video-library/a-man-is-surfing',
|
| 123 |
+
'A racoon is surfing, cartoon style.',
|
| 124 |
+
8,
|
| 125 |
+
1,
|
| 126 |
+
3,
|
| 127 |
+
50,
|
| 128 |
+
7.5,
|
| 129 |
+
],
|
| 130 |
+
[
|
| 131 |
+
'Tune-A-Video-library/mo-di-bear-guitar',
|
| 132 |
+
'a handsome prince is playing guitar, modern disney style.',
|
| 133 |
+
8,
|
| 134 |
+
1,
|
| 135 |
+
123,
|
| 136 |
+
50,
|
| 137 |
+
7.5,
|
| 138 |
+
],
|
| 139 |
+
[
|
| 140 |
+
'Tune-A-Video-library/mo-di-bear-guitar',
|
| 141 |
+
'a magical princess is playing guitar, modern disney style.',
|
| 142 |
+
8,
|
| 143 |
+
1,
|
| 144 |
+
123,
|
| 145 |
+
50,
|
| 146 |
+
7.5,
|
| 147 |
+
],
|
| 148 |
+
[
|
| 149 |
+
'Tune-A-Video-library/mo-di-bear-guitar',
|
| 150 |
+
'a rabbit is playing guitar, modern disney style.',
|
| 151 |
+
8,
|
| 152 |
+
1,
|
| 153 |
+
123,
|
| 154 |
+
50,
|
| 155 |
+
7.5,
|
| 156 |
+
],
|
| 157 |
+
[
|
| 158 |
+
'Tune-A-Video-library/mo-di-bear-guitar',
|
| 159 |
+
'a baby is playing guitar, modern disney style.',
|
| 160 |
+
8,
|
| 161 |
+
1,
|
| 162 |
+
123,
|
| 163 |
+
50,
|
| 164 |
+
7.5,
|
| 165 |
+
],
|
| 166 |
+
[
|
| 167 |
+
'Tune-A-Video-library/redshift-man-skiing',
|
| 168 |
+
'(redshift style) spider man is skiing.',
|
| 169 |
+
8,
|
| 170 |
+
1,
|
| 171 |
+
123,
|
| 172 |
+
50,
|
| 173 |
+
7.5,
|
| 174 |
+
],
|
| 175 |
+
[
|
| 176 |
+
'Tune-A-Video-library/redshift-man-skiing',
|
| 177 |
+
'(redshift style) black widow is skiing.',
|
| 178 |
+
8,
|
| 179 |
+
1,
|
| 180 |
+
123,
|
| 181 |
+
50,
|
| 182 |
+
7.5,
|
| 183 |
+
],
|
| 184 |
+
[
|
| 185 |
+
'Tune-A-Video-library/redshift-man-skiing',
|
| 186 |
+
'(redshift style) batman is skiing.',
|
| 187 |
+
8,
|
| 188 |
+
1,
|
| 189 |
+
123,
|
| 190 |
+
50,
|
| 191 |
+
7.5,
|
| 192 |
+
],
|
| 193 |
+
[
|
| 194 |
+
'Tune-A-Video-library/redshift-man-skiing',
|
| 195 |
+
'(redshift style) hulk is skiing.',
|
| 196 |
+
8,
|
| 197 |
+
1,
|
| 198 |
+
123,
|
| 199 |
+
50,
|
| 200 |
+
7.5,
|
| 201 |
+
],
|
| 202 |
+
]
|
| 203 |
+
gr.Examples(examples=examples,
|
| 204 |
+
inputs=[
|
| 205 |
+
model_id,
|
| 206 |
+
prompt,
|
| 207 |
+
video_length,
|
| 208 |
+
fps,
|
| 209 |
+
seed,
|
| 210 |
+
num_steps,
|
| 211 |
+
guidance_scale,
|
| 212 |
+
],
|
| 213 |
+
outputs=result,
|
| 214 |
+
fn=pipe.run)
|
| 215 |
|
| 216 |
reload_button.click(fn=app.reload_model_list_and_update_model_info,
|
| 217 |
inputs=None,
|