Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ def process_video(video_path, prompt, num_steps, degradation_level):
|
|
| 58 |
|
| 59 |
# Return the path to the output video
|
| 60 |
gr.Success("Done!")
|
| 61 |
-
return output_video
|
| 62 |
except subprocess.CalledProcessError as e:
|
| 63 |
|
| 64 |
raise gr.Error(f"An error occurred: {str(e)}")
|
|
@@ -100,7 +100,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 100 |
num_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=30, value=5, step=1, interactive=False)
|
| 101 |
degradation = gr.Slider(label="Noise Degradation", minimum=0, maximum=1, value=0.5, step=0.1, interactive=False)
|
| 102 |
else:
|
| 103 |
-
num_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=30, value=
|
| 104 |
degradation = gr.Slider(label="Noise Degradation", minimum=0, maximum=1, value=0.5, step=0.1, interactive=True)
|
| 105 |
|
| 106 |
submit_btn = gr.Button("Submit")
|
|
@@ -113,7 +113,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 113 |
)
|
| 114 |
with gr.Column():
|
| 115 |
output_video = gr.Video(label="Result")
|
| 116 |
-
|
| 117 |
gr.HTML("""
|
| 118 |
<div id="follow-div">
|
| 119 |
<a href="https://huggingface.co/fffiloni">
|
|
@@ -125,7 +125,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 125 |
submit_btn.click(
|
| 126 |
fn = process_video,
|
| 127 |
inputs = [input_video, prompt, num_steps, degradation],
|
| 128 |
-
outputs = [output_video
|
| 129 |
)
|
| 130 |
|
| 131 |
demo.queue().launch(show_api=False)
|
|
|
|
| 58 |
|
| 59 |
# Return the path to the output video
|
| 60 |
gr.Success("Done!")
|
| 61 |
+
return output_video
|
| 62 |
except subprocess.CalledProcessError as e:
|
| 63 |
|
| 64 |
raise gr.Error(f"An error occurred: {str(e)}")
|
|
|
|
| 100 |
num_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=30, value=5, step=1, interactive=False)
|
| 101 |
degradation = gr.Slider(label="Noise Degradation", minimum=0, maximum=1, value=0.5, step=0.1, interactive=False)
|
| 102 |
else:
|
| 103 |
+
num_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=30, value=20, step=1, interactive=True)
|
| 104 |
degradation = gr.Slider(label="Noise Degradation", minimum=0, maximum=1, value=0.5, step=0.1, interactive=True)
|
| 105 |
|
| 106 |
submit_btn = gr.Button("Submit")
|
|
|
|
| 113 |
)
|
| 114 |
with gr.Column():
|
| 115 |
output_video = gr.Video(label="Result")
|
| 116 |
+
|
| 117 |
gr.HTML("""
|
| 118 |
<div id="follow-div">
|
| 119 |
<a href="https://huggingface.co/fffiloni">
|
|
|
|
| 125 |
submit_btn.click(
|
| 126 |
fn = process_video,
|
| 127 |
inputs = [input_video, prompt, num_steps, degradation],
|
| 128 |
+
outputs = [output_video]
|
| 129 |
)
|
| 130 |
|
| 131 |
demo.queue().launch(show_api=False)
|