Spaces:
Runtime error
Runtime error
added examples
Browse files
app.py
CHANGED
@@ -140,7 +140,7 @@ def infer(prompt,video_in, seed_in, trim_value):
|
|
140 |
# exporting the image
|
141 |
rgb_im.save(f"result_img-{i}.jpg")
|
142 |
result_frames.append(f"result_img-{i}.jpg")
|
143 |
-
print("frame " + i + ": done;")
|
144 |
|
145 |
final_vid = create_video(result_frames, fps)
|
146 |
print("finished !")
|
@@ -171,7 +171,7 @@ article = """
|
|
171 |
|
172 |
<div class="footer">
|
173 |
<p>
|
174 |
-
|
175 |
Follow <a href="https://twitter.com/fffiloni" target="_blank">Sylvain Filoni</a> for future updates π€
|
176 |
</p>
|
177 |
</div>
|
@@ -197,7 +197,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
197 |
with gr.Row():
|
198 |
with gr.Column():
|
199 |
prompt = gr.Textbox(label="Prompt", placeholder="enter prompt", show_label=False, elem_id="prompt-in")
|
200 |
-
video_inp = gr.Video(label="Video source", source="upload", type="filepath",
|
201 |
with gr.Row():
|
202 |
seed_inp = gr.Slider(label="Seed", minimum=0, maximum=2147483647, step=1, value=123456)
|
203 |
trim_in = gr.Slider(label="Cut video at (s)", minimun=1, maximum=3, step=1, value=1)
|
@@ -221,4 +221,15 @@ with gr.Blocks(css='style.css') as demo:
|
|
221 |
submit_btn.click(infer, inputs, outputs)
|
222 |
share_button.click(None, [], [], _js=share_js)
|
223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
demo.launch().queue(max_size=12)
|
|
|
140 |
# exporting the image
|
141 |
rgb_im.save(f"result_img-{i}.jpg")
|
142 |
result_frames.append(f"result_img-{i}.jpg")
|
143 |
+
print("frame " + i + "/" + str(n_frame) + ": done;")
|
144 |
|
145 |
final_vid = create_video(result_frames, fps)
|
146 |
print("finished !")
|
|
|
171 |
|
172 |
<div class="footer">
|
173 |
<p>
|
174 |
+
Examples by <a href="https://twitter.com/CitizenPlain" target="_blank">Nathan Shipley</a> β’
|
175 |
Follow <a href="https://twitter.com/fffiloni" target="_blank">Sylvain Filoni</a> for future updates π€
|
176 |
</p>
|
177 |
</div>
|
|
|
197 |
with gr.Row():
|
198 |
with gr.Column():
|
199 |
prompt = gr.Textbox(label="Prompt", placeholder="enter prompt", show_label=False, elem_id="prompt-in")
|
200 |
+
video_inp = gr.Video(label="Video source", source="upload", type="filepath", elem_id="input-vid")
|
201 |
with gr.Row():
|
202 |
seed_inp = gr.Slider(label="Seed", minimum=0, maximum=2147483647, step=1, value=123456)
|
203 |
trim_in = gr.Slider(label="Cut video at (s)", minimun=1, maximum=3, step=1, value=1)
|
|
|
221 |
submit_btn.click(infer, inputs, outputs)
|
222 |
share_button.click(None, [], [], _js=share_js)
|
223 |
|
224 |
+
ex = gr.Examples(
|
225 |
+
[
|
226 |
+
["Make it a marble sculpture", "/examples/pexels-jill-burrow-7665249_512x512.mp4", 422112651, 4],
|
227 |
+
["Make it molten lava", "/examples/Ocean_Pexels_ 8953474_512x512.mp4", 43571876, 4]
|
228 |
+
],
|
229 |
+
inputs=inputs,
|
230 |
+
outputs=outputs,
|
231 |
+
fn=infer,
|
232 |
+
cache_examples=True,
|
233 |
+
)
|
234 |
+
|
235 |
demo.launch().queue(max_size=12)
|