Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def generate_image(prompt, base="Anime", motion="", step=8, progress=gr.Progress
|
|
21 |
base=base,
|
22 |
motion=motion,
|
23 |
step=step,
|
24 |
-
api_name="/
|
25 |
)
|
26 |
video_path = result["video"]
|
27 |
return video_path
|
@@ -31,7 +31,7 @@ def generate_image(prompt, base="Anime", motion="", step=8, progress=gr.Progress
|
|
31 |
|
32 |
|
33 |
# Ссылка на файл CSS
|
34 |
-
css_url = "https://
|
35 |
|
36 |
# Получение CSS по ссылке
|
37 |
response = requests.get(css_url)
|
@@ -71,15 +71,15 @@ with gr.Blocks(css=css) as demo:
|
|
71 |
select_motion = gr.Dropdown(
|
72 |
label='Движение',
|
73 |
choices=[
|
74 |
-
("
|
75 |
-
("
|
76 |
-
("
|
77 |
-
("
|
78 |
-
("
|
79 |
-
("
|
80 |
-
("
|
81 |
-
("
|
82 |
-
("
|
83 |
],
|
84 |
value="",
|
85 |
interactive=True
|
@@ -100,7 +100,7 @@ with gr.Blocks(css=css) as demo:
|
|
100 |
variant='primary'
|
101 |
)
|
102 |
video = gr.Video(
|
103 |
-
label='
|
104 |
autoplay=True,
|
105 |
height=512,
|
106 |
width=512,
|
@@ -118,4 +118,4 @@ with gr.Blocks(css=css) as demo:
|
|
118 |
outputs=video,
|
119 |
)
|
120 |
|
121 |
-
demo.queue().launch()
|
|
|
21 |
base=base,
|
22 |
motion=motion,
|
23 |
step=step,
|
24 |
+
api_name="/instant_video"
|
25 |
)
|
26 |
video_path = result["video"]
|
27 |
return video_path
|
|
|
31 |
|
32 |
|
33 |
# Ссылка на файл CSS
|
34 |
+
css_url = "https://neurixyufi-aihub.static.hf.space/style.css"
|
35 |
|
36 |
# Получение CSS по ссылке
|
37 |
response = requests.get(css_url)
|
|
|
71 |
select_motion = gr.Dropdown(
|
72 |
label='Движение',
|
73 |
choices=[
|
74 |
+
("По умолчанию", ""),
|
75 |
+
("Приближение", "guoyww/animatediff-motion-lora-zoom-in"),
|
76 |
+
("Отдаление", "guoyww/animatediff-motion-lora-zoom-out"),
|
77 |
+
("Наклон вверх", "guoyww/animatediff-motion-lora-tilt-up"),
|
78 |
+
("Наклон вниз", "guoyww/animatediff-motion-lora-tilt-down"),
|
79 |
+
("Панорама влево", "guoyww/animatediff-motion-lora-pan-left"),
|
80 |
+
("Панорама вправо", "guoyww/animatediff-motion-lora-pan-right"),
|
81 |
+
("Поворот влево", "guoyww/animatediff-motion-lora-rolling-anticlockwise"),
|
82 |
+
("Поворот вправо", "guoyww/animatediff-motion-lora-rolling-clockwise"),
|
83 |
],
|
84 |
value="",
|
85 |
interactive=True
|
|
|
100 |
variant='primary'
|
101 |
)
|
102 |
video = gr.Video(
|
103 |
+
label='Созданое видео',
|
104 |
autoplay=True,
|
105 |
height=512,
|
106 |
width=512,
|
|
|
118 |
outputs=video,
|
119 |
)
|
120 |
|
121 |
+
demo.queue(max_size=250).launch()
|