Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -265,7 +265,8 @@ def resize_image_landscape(image: Image.Image) -> Image.Image:
|
|
| 265 |
|
| 266 |
return image.resize((LANDSCAPE_WIDTH, LANDSCAPE_HEIGHT), Image.LANCZOS)
|
| 267 |
|
| 268 |
-
def get_duration(steps):
|
|
|
|
| 269 |
return int(steps) * 15
|
| 270 |
|
| 271 |
@spaces.GPU(duration=get_duration)
|
|
@@ -452,7 +453,7 @@ with gr.Blocks(css=css, theme=gr.themes.Base()) as demo:
|
|
| 452 |
|
| 453 |
with gr.Column(elem_classes="header-container"):
|
| 454 |
gr.HTML("""
|
| 455 |
-
<h1 class="logo-text">🍌
|
| 456 |
<p class="subtitle">AI-Powered Image Style Transfer with Video Generation</p>
|
| 457 |
<div style="display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 20px;">
|
| 458 |
<a href="https://huggingface.co/spaces/openfree/Nano-Banana-Upscale" target="_blank">
|
|
|
|
| 265 |
|
| 266 |
return image.resize((LANDSCAPE_WIDTH, LANDSCAPE_HEIGHT), Image.LANCZOS)
|
| 267 |
|
| 268 |
+
def get_duration(input_image, prompt, steps, negative_prompt, duration_seconds, guidance_scale, guidance_scale_2, seed, randomize_seed):
|
| 269 |
+
# Duration based on steps parameter
|
| 270 |
return int(steps) * 15
|
| 271 |
|
| 272 |
@spaces.GPU(duration=get_duration)
|
|
|
|
| 453 |
|
| 454 |
with gr.Column(elem_classes="header-container"):
|
| 455 |
gr.HTML("""
|
| 456 |
+
<h1 class="logo-text">🍌 Nano Banana + Video</h1>
|
| 457 |
<p class="subtitle">AI-Powered Image Style Transfer with Video Generation</p>
|
| 458 |
<div style="display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 20px;">
|
| 459 |
<a href="https://huggingface.co/spaces/openfree/Nano-Banana-Upscale" target="_blank">
|