Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,10 +42,11 @@ def download_model(repo_id, model_name):
|
|
42 |
import glob
|
43 |
|
44 |
@spaces.GPU
|
45 |
-
def run_inference(
|
46 |
repo_id = "hpcai-tech/Open-Sora"
|
47 |
|
48 |
# Map model names to their respective configuration files
|
|
|
49 |
config_mapping = {
|
50 |
"OpenSora-v1-16x256x256.pth": "configs/opensora/inference/16x256x256.py",
|
51 |
"OpenSora-v1-HQ-16x256x256.pth": "configs/opensora/inference/16x512x512.py",
|
@@ -110,14 +111,6 @@ def main():
|
|
110 |
|
111 |
with gr.Row():
|
112 |
with gr.Column():
|
113 |
-
model_dropdown = gr.Dropdown(
|
114 |
-
choices=[
|
115 |
-
"OpenSora-v1-16x256x256.pth",
|
116 |
-
"OpenSora-v1-HQ-16x256x256.pth",
|
117 |
-
"OpenSora-v1-HQ-16x512x512.pth"
|
118 |
-
],
|
119 |
-
value="OpenSora-v1-16x256x256.pth"
|
120 |
-
)
|
121 |
prompt_text = gr.Textbox(show_label=False, placeholder="Enter prompt text here", lines=4)
|
122 |
submit_button = gr.Button("Run Inference")
|
123 |
|
@@ -126,7 +119,7 @@ def main():
|
|
126 |
|
127 |
submit_button.click(
|
128 |
fn=run_inference,
|
129 |
-
inputs=[
|
130 |
outputs=output_video
|
131 |
)
|
132 |
|
|
|
42 |
import glob
|
43 |
|
44 |
@spaces.GPU
|
45 |
+
def run_inference(prompt_text):
|
46 |
repo_id = "hpcai-tech/Open-Sora"
|
47 |
|
48 |
# Map model names to their respective configuration files
|
49 |
+
model_name = "OpenSora-v1-HQ-16x512x512.pth"
|
50 |
config_mapping = {
|
51 |
"OpenSora-v1-16x256x256.pth": "configs/opensora/inference/16x256x256.py",
|
52 |
"OpenSora-v1-HQ-16x256x256.pth": "configs/opensora/inference/16x512x512.py",
|
|
|
111 |
|
112 |
with gr.Row():
|
113 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
prompt_text = gr.Textbox(show_label=False, placeholder="Enter prompt text here", lines=4)
|
115 |
submit_button = gr.Button("Run Inference")
|
116 |
|
|
|
119 |
|
120 |
submit_button.click(
|
121 |
fn=run_inference,
|
122 |
+
inputs=[prompt_text],
|
123 |
outputs=output_video
|
124 |
)
|
125 |
|