Spaces:
Runtime error
Runtime error
Commit
·
f8aa469
1
Parent(s):
87048a2
Update app.py
Browse files
app.py
CHANGED
@@ -18,19 +18,29 @@ def run_replicate_model(input_params):
|
|
18 |
st.title("Stable Video Diffusion")
|
19 |
st.write("Fill in the input parameters and click on the button to run the Stable Video Diffusion model.")
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
input_image =
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
frames_per_second = st.number_input("Frames Per Second", value=6)
|
28 |
|
29 |
input_params = {
|
30 |
"cond_aug": cond_aug,
|
31 |
"decoding_t": decoding_t,
|
32 |
"input_image": input_image,
|
33 |
-
"video_length":
|
34 |
"sizing_strategy": sizing_strategy,
|
35 |
"motion_bucket_id": motion_bucket_id,
|
36 |
"frames_per_second": frames_per_second
|
|
|
18 |
st.title("Stable Video Diffusion")
|
19 |
st.write("Fill in the input parameters and click on the button to run the Stable Video Diffusion model.")
|
20 |
|
21 |
+
# Allow users to upload an image file or provide a URL
|
22 |
+
uploaded_file = st.file_uploader("Upload Image File", type=["jpg", "png", "jpeg"])
|
23 |
+
input_image = None
|
24 |
+
if uploaded_file is not None:
|
25 |
+
input_image = uploaded_file
|
26 |
+
else:
|
27 |
+
input_image = st.text_input("Input Image URL", "https://example.com/s-widua-icjKmXvsO7U-unsplash.jpg")
|
28 |
+
|
29 |
+
# Additional parameters
|
30 |
+
expander = st.beta_expander("Additional Parameters")
|
31 |
+
with expander:
|
32 |
+
cond_aug = st.number_input("Conditioning Augmentation", value=0.02, step=0.01)
|
33 |
+
decoding_t = st.number_input("Decoding Time", value=7)
|
34 |
+
sizing_strategy = st.selectbox("Sizing Strategy", ["maintain_aspect_ratio", "other_options"])
|
35 |
+
motion_bucket_id = st.number_input("Motion Bucket ID", value=127)
|
36 |
+
|
37 |
frames_per_second = st.number_input("Frames Per Second", value=6)
|
38 |
|
39 |
input_params = {
|
40 |
"cond_aug": cond_aug,
|
41 |
"decoding_t": decoding_t,
|
42 |
"input_image": input_image,
|
43 |
+
"video_length": "14_frames_with_svd",
|
44 |
"sizing_strategy": sizing_strategy,
|
45 |
"motion_bucket_id": motion_bucket_id,
|
46 |
"frames_per_second": frames_per_second
|