Spaces:
Paused
Paused
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -245,49 +245,51 @@ def handle_generate(*inp):
|
|
| 245 |
def ui():
|
| 246 |
global result
|
| 247 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
with gr.
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
with gr.Row(visible=False):
|
| 262 |
-
prompt2 = gr.Textbox(
|
| 263 |
-
elem_id="prompt2",
|
| 264 |
-
placeholder="EXCLUDE",
|
| 265 |
-
container=False,
|
| 266 |
-
max_lines=1
|
| 267 |
-
)
|
| 268 |
-
with gr.Row(visible=False):
|
| 269 |
-
motion = gr.Dropdown(
|
| 270 |
-
label='CAMERA',
|
| 271 |
-
show_label=True,
|
| 272 |
-
container=True,
|
| 273 |
-
choices=[
|
| 274 |
-
("(No Effect)", ""),
|
| 275 |
-
("Zoom in", "guoyww/#animatediff-motion-lora-zoom-in"),
|
| 276 |
-
("Zoom out", "guoyww/#animatediff-motion-lora-zoom-out"),
|
| 277 |
-
("Tilt up", "guoyww/#animatediff-motion-lora-tilt-up"),
|
| 278 |
-
("Tilt down", "guoyww/#animatediff-motion-lora-tilt-down"),
|
| 279 |
-
("Pan left", "guoyww/#animatediff-motion-lora-pan-left"),
|
| 280 |
-
("Pan right", "guoyww/#animatediff-motion-lora-pan-right"),
|
| 281 |
-
("Roll left", "guoyww/#animatediff-motion-lora-rolling-anticlockwise"),
|
| 282 |
-
("Roll right", "guoyww/#animatediff-motion-lora-rolling-clockwise"),
|
| 283 |
-
],
|
| 284 |
-
value="",
|
| 285 |
-
interactive=True
|
| 286 |
)
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
|
| 292 |
gr.on(
|
| 293 |
triggers=[
|
|
|
|
| 245 |
def ui():
|
| 246 |
global result
|
| 247 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
| 248 |
+
gr.Markdown(f"""
|
| 249 |
+
# MULTI-LANGUAGE GIF CREATOR
|
| 250 |
+
""")
|
| 251 |
+
with gr.Row(elem_id="col-container"):
|
| 252 |
+
with gr.Column():
|
| 253 |
+
with gr.Row():
|
| 254 |
+
img = gr.Image(label="STATIC PHOTO",show_label=True,container=True,type="pil")
|
| 255 |
+
with gr.Row():
|
| 256 |
+
prompt = gr.Textbox(
|
| 257 |
+
elem_id="prompt",
|
| 258 |
+
placeholder="PROMPT",
|
| 259 |
+
container=False,
|
| 260 |
+
max_lines=1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
)
|
| 262 |
+
with gr.Row(visible=False):
|
| 263 |
+
prompt2 = gr.Textbox(
|
| 264 |
+
elem_id="prompt2",
|
| 265 |
+
placeholder="EXCLUDE",
|
| 266 |
+
container=False,
|
| 267 |
+
max_lines=1
|
| 268 |
+
)
|
| 269 |
+
with gr.Row(visible=False):
|
| 270 |
+
motion = gr.Dropdown(
|
| 271 |
+
label='CAMERA',
|
| 272 |
+
show_label=True,
|
| 273 |
+
container=True,
|
| 274 |
+
choices=[
|
| 275 |
+
("(No Effect)", ""),
|
| 276 |
+
("Zoom in", "guoyww/#animatediff-motion-lora-zoom-in"),
|
| 277 |
+
("Zoom out", "guoyww/#animatediff-motion-lora-zoom-out"),
|
| 278 |
+
("Tilt up", "guoyww/#animatediff-motion-lora-tilt-up"),
|
| 279 |
+
("Tilt down", "guoyww/#animatediff-motion-lora-tilt-down"),
|
| 280 |
+
("Pan left", "guoyww/#animatediff-motion-lora-pan-left"),
|
| 281 |
+
("Pan right", "guoyww/#animatediff-motion-lora-pan-right"),
|
| 282 |
+
("Roll left", "guoyww/#animatediff-motion-lora-rolling-anticlockwise"),
|
| 283 |
+
("Roll right", "guoyww/#animatediff-motion-lora-rolling-clockwise"),
|
| 284 |
+
],
|
| 285 |
+
value="",
|
| 286 |
+
interactive=True
|
| 287 |
+
)
|
| 288 |
+
with gr.Column():
|
| 289 |
+
with gr.Row():
|
| 290 |
+
run_button = gr.Button("START",elem_classes="btn",scale=0)
|
| 291 |
+
with gr.Row():
|
| 292 |
+
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
| 293 |
|
| 294 |
gr.on(
|
| 295 |
triggers=[
|