Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,8 @@ def run_inference(model_name, prompt_text):
|
|
37 |
# Map model names to their respective configuration files
|
38 |
config_mapping = {
|
39 |
"OpenSora-v1-16x256x256.pth": "configs/opensora/inference/16x256x256.py",
|
40 |
-
"OpenSora-v1-HQ-16x256x256.pth": "configs/opensora/inference/
|
41 |
-
"OpenSora-v1-HQ-16x512x512.pth": "configs/opensora/inference/
|
42 |
}
|
43 |
|
44 |
config_path = config_mapping[model_name]
|
@@ -88,11 +88,26 @@ def main():
|
|
88 |
],
|
89 |
value="OpenSora-v1-16x256x256.pth",
|
90 |
label="Model Selection"),
|
91 |
-
gr.Textbox(label="Prompt Text", value="
|
92 |
],
|
93 |
outputs=gr.Video(label="Output Video"),
|
94 |
title="Open-Sora Inference",
|
95 |
description="Run Open-Sora Inference with Custom Parameters",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
).launch()
|
97 |
|
98 |
if __name__ == "__main__":
|
|
|
37 |
# Map model names to their respective configuration files
|
38 |
config_mapping = {
|
39 |
"OpenSora-v1-16x256x256.pth": "configs/opensora/inference/16x256x256.py",
|
40 |
+
"OpenSora-v1-HQ-16x256x256.pth": "configs/opensora/inference/16x256x256.py",
|
41 |
+
"OpenSora-v1-HQ-16x512x512.pth": "configs/opensora/inference/16x512x512.py"
|
42 |
}
|
43 |
|
44 |
config_path = config_mapping[model_name]
|
|
|
88 |
],
|
89 |
value="OpenSora-v1-16x256x256.pth",
|
90 |
label="Model Selection"),
|
91 |
+
gr.Textbox(label="Prompt Text", value="iron man riding a skateboard in new york city")
|
92 |
],
|
93 |
outputs=gr.Video(label="Output Video"),
|
94 |
title="Open-Sora Inference",
|
95 |
description="Run Open-Sora Inference with Custom Parameters",
|
96 |
+
# examples=[
|
97 |
+
# ["OpenSora-v1-HQ-16x256x256.pth", "iron man riding a skateboard in new york city"],
|
98 |
+
# ["OpenSora-v1-16x256x256.pth", "a man is skiing down a snowy mountain. a drone shot from above. an avalanche is chasing him from behind."],
|
99 |
+
# ["OpenSora-v1-16x256x256.pth", "Extreme close up of a 24 year old woman’s eye blinking, standing in Marrakech during magic hour, cinematic film shot in 70mm, depth of field, vivid colors, cinematic"],
|
100 |
+
# ],
|
101 |
+
article = """
|
102 |
+
# Examples
|
103 |
+
|
104 |
+
| Model | Description | Video Player Embedding |
|
105 |
+
|------------------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
|
106 |
+
| OpenSora-v1-HQ-16x256x256.pth | Iron Man riding a skateboard in New York City |  |
|
107 |
+
| OpenSora-v1-16x256x256.pth | A man is skiing down a snowy mountain. A drone shot from above. An avalanche is chasing him from behind. |  |
|
108 |
+
| OpenSora-v1-16x256x256.pth | Extreme close-up of a 24-year-old woman’s eye blinking, standing in Marrakech during magic hour, cinematic film shot in 70mm, depth of field, vivid colors, cinematic |  |
|
109 |
+
|
110 |
+
"""
|
111 |
).launch()
|
112 |
|
113 |
if __name__ == "__main__":
|