Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,15 @@ import torch
|
|
2 |
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
|
3 |
from diffusers.utils import export_to_video
|
4 |
import streamlit as st
|
|
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
# Title and User Input
|
7 |
st.title("Text-to-Video with Streamlit")
|
8 |
prompt = st.text_input("Enter your text prompt:", "Spiderman is surfing")
|
|
|
2 |
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
|
3 |
from diffusers.utils import export_to_video
|
4 |
import streamlit as st
|
5 |
+
from diffusers import UNet2DConditionModel, TextEncoder, VQModel
|
6 |
|
7 |
+
# Use the default model names here
|
8 |
+
unet_model_name = "unet/diffusion_pytorch_model.bin"
|
9 |
+
text_encoder_name = "text_encoder/pytorch_model.bin"
|
10 |
+
vae_model_name = "vae/diffusion_pytorch_model.bin"
|
11 |
+
|
12 |
+
# Create the pipeline or model objects using the default names
|
13 |
+
pipeline = UNet2DConditionModel.from_pretrained(unet_model_name)
|
14 |
# Title and User Input
|
15 |
st.title("Text-to-Video with Streamlit")
|
16 |
prompt = st.text_input("Enter your text prompt:", "Spiderman is surfing")
|