Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -233,17 +233,17 @@ with gr.Blocks(css=css) as demo:
|
|
| 233 |
with gr.Row():
|
| 234 |
with gr.Column():
|
| 235 |
prompt = gr.Textbox(label="Prompt (Less than 200 Words)", value="Sunset over the sea.", lines=5)
|
| 236 |
-
with gr.Row():
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
|
| 242 |
with gr.Column():
|
| 243 |
gr.Markdown(
|
| 244 |
"**Optional Parameters** (default values are recommended)<br>"
|
| 245 |
"Turn Inference Steps larger if you want more detailed video, but it will be slower.<br>"
|
| 246 |
-
"50 steps are recommended for most cases. will cause 120 seconds for inference.<br>"
|
| 247 |
)
|
| 248 |
with gr.Row():
|
| 249 |
num_inference_steps = gr.Number(label="Inference Steps", value=50)
|
|
@@ -253,14 +253,6 @@ with gr.Blocks(css=css) as demo:
|
|
| 253 |
with gr.Row():
|
| 254 |
generate_button = gr.Button("🎬 Generate Video")
|
| 255 |
generate_button_vs = gr.Button("⚡️ Generate Video with VideoSys (Faster)")
|
| 256 |
-
# with gr.Row(elem_classes="server-status"):
|
| 257 |
-
# gr.Markdown("#### Server Status")
|
| 258 |
-
# with gr.Row():
|
| 259 |
-
# cpu_status = gr.Textbox(label="CPU", scale=1)
|
| 260 |
-
# memory_status = gr.Textbox(label="Memory", scale=1)
|
| 261 |
-
# disk_status = gr.Textbox(label="Disk", scale=1)
|
| 262 |
-
# gpu_status = gr.Textbox(label="GPU Memory", scale=1)
|
| 263 |
-
# refresh_button = gr.Button("Refresh", scale=1, size="sm")
|
| 264 |
with gr.Column(elem_classes="server-status"):
|
| 265 |
gr.Markdown("#### Server Status")
|
| 266 |
|
|
@@ -286,8 +278,8 @@ with gr.Blocks(css=css) as demo:
|
|
| 286 |
with gr.Row():
|
| 287 |
download_video_button_vs = gr.File(label="📥 Download Video", visible=False)
|
| 288 |
elapsed_time_vs = gr.Textbox(label="Elapsed Time", value="0s", visible=False)
|
| 289 |
-
with gr.Column():
|
| 290 |
-
|
| 291 |
|
| 292 |
|
| 293 |
|
|
@@ -324,7 +316,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 324 |
try:
|
| 325 |
gpus = GPUtil.getGPUs()
|
| 326 |
if gpus:
|
| 327 |
-
gpu = gpus[0]
|
| 328 |
gpu_memory = f"{gpu.memoryUsed}/{gpu.memoryTotal}MB ({gpu.memoryUtil*100:.1f}%)"
|
| 329 |
else:
|
| 330 |
gpu_memory = "No GPU found"
|
|
|
|
| 233 |
with gr.Row():
|
| 234 |
with gr.Column():
|
| 235 |
prompt = gr.Textbox(label="Prompt (Less than 200 Words)", value="Sunset over the sea.", lines=5)
|
| 236 |
+
# with gr.Row():
|
| 237 |
+
# gr.Markdown(
|
| 238 |
+
# "✨Upon pressing the enhanced prompt button, we will use [GLM-4 Model](https://github.com/THUDM/GLM-4) to polish the prompt and overwrite the original one."
|
| 239 |
+
# )
|
| 240 |
+
# enhance_button = gr.Button("✨ Enhance Prompt(Optional)")
|
| 241 |
|
| 242 |
with gr.Column():
|
| 243 |
gr.Markdown(
|
| 244 |
"**Optional Parameters** (default values are recommended)<br>"
|
| 245 |
"Turn Inference Steps larger if you want more detailed video, but it will be slower.<br>"
|
| 246 |
+
# "50 steps are recommended for most cases. will cause 120 seconds for inference.<br>"
|
| 247 |
)
|
| 248 |
with gr.Row():
|
| 249 |
num_inference_steps = gr.Number(label="Inference Steps", value=50)
|
|
|
|
| 253 |
with gr.Row():
|
| 254 |
generate_button = gr.Button("🎬 Generate Video")
|
| 255 |
generate_button_vs = gr.Button("⚡️ Generate Video with VideoSys (Faster)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
with gr.Column(elem_classes="server-status"):
|
| 257 |
gr.Markdown("#### Server Status")
|
| 258 |
|
|
|
|
| 278 |
with gr.Row():
|
| 279 |
download_video_button_vs = gr.File(label="📥 Download Video", visible=False)
|
| 280 |
elapsed_time_vs = gr.Textbox(label="Elapsed Time", value="0s", visible=False)
|
| 281 |
+
# with gr.Column():
|
| 282 |
+
# task_status = gr.Textbox(label="任务状态", visible=False)
|
| 283 |
|
| 284 |
|
| 285 |
|
|
|
|
| 316 |
try:
|
| 317 |
gpus = GPUtil.getGPUs()
|
| 318 |
if gpus:
|
| 319 |
+
gpu = gpus[0]
|
| 320 |
gpu_memory = f"{gpu.memoryUsed}/{gpu.memoryTotal}MB ({gpu.memoryUtil*100:.1f}%)"
|
| 321 |
else:
|
| 322 |
gpu_memory = "No GPU found"
|