Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,8 @@ import subprocess
|
|
| 3 |
import shutil
|
| 4 |
import os
|
| 5 |
|
|
|
|
|
|
|
| 6 |
from huggingface_hub import snapshot_download
|
| 7 |
|
| 8 |
# Define the folder name
|
|
@@ -86,8 +88,13 @@ with gr.Blocks(css=css) as demo:
|
|
| 86 |
input_video = gr.Video(label="Input Video")
|
| 87 |
prompt = gr.Textbox(label="Prompt")
|
| 88 |
with gr.Row():
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
submit_btn = gr.Button("Submit")
|
| 92 |
gr.Examples(
|
| 93 |
examples = [
|
|
@@ -99,10 +106,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 99 |
with gr.Column():
|
| 100 |
output_video = gr.Video(label="Result")
|
| 101 |
gr.HTML("""
|
| 102 |
-
<
|
| 103 |
-
<
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
| 106 |
|
| 107 |
submit_btn.click(
|
| 108 |
fn = process_video,
|
|
|
|
| 3 |
import shutil
|
| 4 |
import os
|
| 5 |
|
| 6 |
+
is_shared_ui = True if "fffiloni/Go-With-The-Flow" in os.environ['SPACE_ID'] else False
|
| 7 |
+
|
| 8 |
from huggingface_hub import snapshot_download
|
| 9 |
|
| 10 |
# Define the folder name
|
|
|
|
| 88 |
input_video = gr.Video(label="Input Video")
|
| 89 |
prompt = gr.Textbox(label="Prompt")
|
| 90 |
with gr.Row():
|
| 91 |
+
if is_shared_ui:
|
| 92 |
+
num_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=30, value=5, step=1, interactive=False)
|
| 93 |
+
degradation = gr.Slider(label="Noise Degradation", minimum=0, maximum=1, value=0, step=0.1, interactive=False)
|
| 94 |
+
else:
|
| 95 |
+
num_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=30, value=5, step=1, interactive=True)
|
| 96 |
+
degradation = gr.Slider(label="Noise Degradation", minimum=0, maximum=1, value=0, step=0.1, interactive=True)
|
| 97 |
+
|
| 98 |
submit_btn = gr.Button("Submit")
|
| 99 |
gr.Examples(
|
| 100 |
examples = [
|
|
|
|
| 106 |
with gr.Column():
|
| 107 |
output_video = gr.Video(label="Result")
|
| 108 |
gr.HTML("""
|
| 109 |
+
<div id="follow-div">
|
| 110 |
+
<a href="https://huggingface.co/fffiloni">
|
| 111 |
+
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/follow-me-on-HF-sm-dark.svg" alt="Follow me on HF">
|
| 112 |
+
</a>
|
| 113 |
+
<p>for space updates</p>
|
| 114 |
+
""")
|
| 115 |
|
| 116 |
submit_btn.click(
|
| 117 |
fn = process_video,
|