update app.py
Browse files- app.py +7 -7
- examples/driving_5.mp4 +3 -0
- examples/source_10.png +3 -0
- examples/source_11.png +3 -0
- examples/source_7.png +3 -0
- examples/source_8.png +3 -0
- examples/source_9.png +3 -0
app.py
CHANGED
|
@@ -403,7 +403,7 @@ class InferenceAgent:
|
|
| 403 |
if temp_crop_video and os.path.exists(temp_crop_video): os.remove(temp_crop_video)
|
| 404 |
if not vid_results: raise Exception("Driving video reading failed.")
|
| 405 |
vid_tensor = torch.cat(vid_results, dim=0)
|
| 406 |
-
return self.save_video(vid_tensor, fps=fps, audio_path=
|
| 407 |
|
| 408 |
print("Initializing Configuration...")
|
| 409 |
cfg = AppConfig()
|
|
@@ -542,12 +542,11 @@ with gr.Blocks(title="IMTalker Demo") as demo:
|
|
| 542 |
# --- 图片示例 (独立) ---
|
| 543 |
gr.Examples(
|
| 544 |
examples=[
|
| 545 |
-
["examples/
|
| 546 |
-
["examples/
|
| 547 |
-
["examples/
|
| 548 |
-
["examples/
|
| 549 |
-
["examples/
|
| 550 |
-
["examples/source_6.png"],
|
| 551 |
],
|
| 552 |
inputs=[v_img],
|
| 553 |
label="Example Images",
|
|
@@ -565,6 +564,7 @@ with gr.Blocks(title="IMTalker Demo") as demo:
|
|
| 565 |
["examples/driving_2.mp4"],
|
| 566 |
["examples/driving_3.mp4"],
|
| 567 |
["examples/driving_4.mp4"],
|
|
|
|
| 568 |
],
|
| 569 |
inputs=[v_vid],
|
| 570 |
label="Example Videos",
|
|
|
|
| 403 |
if temp_crop_video and os.path.exists(temp_crop_video): os.remove(temp_crop_video)
|
| 404 |
if not vid_results: raise Exception("Driving video reading failed.")
|
| 405 |
vid_tensor = torch.cat(vid_results, dim=0)
|
| 406 |
+
return self.save_video(vid_tensor, fps=fps, audio_path=driving_video_path)
|
| 407 |
|
| 408 |
print("Initializing Configuration...")
|
| 409 |
cfg = AppConfig()
|
|
|
|
| 542 |
# --- 图片示例 (独立) ---
|
| 543 |
gr.Examples(
|
| 544 |
examples=[
|
| 545 |
+
["examples/source_7.png"],
|
| 546 |
+
["examples/source_8.png"],
|
| 547 |
+
["examples/source_9.jpg"],
|
| 548 |
+
["examples/source_10.png"],
|
| 549 |
+
["examples/source_11.png"],
|
|
|
|
| 550 |
],
|
| 551 |
inputs=[v_img],
|
| 552 |
label="Example Images",
|
|
|
|
| 564 |
["examples/driving_2.mp4"],
|
| 565 |
["examples/driving_3.mp4"],
|
| 566 |
["examples/driving_4.mp4"],
|
| 567 |
+
["examples/driving_5.mp4"],
|
| 568 |
],
|
| 569 |
inputs=[v_vid],
|
| 570 |
label="Example Videos",
|
examples/driving_5.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b8db6c9b0ce183d9b533a8ce8038337a93bdfc7884d3a951fbf9ef60d6475684
|
| 3 |
+
size 561397
|
examples/source_10.png
ADDED
|
Git LFS Details
|
examples/source_11.png
ADDED
|
Git LFS Details
|
examples/source_7.png
ADDED
|
Git LFS Details
|
examples/source_8.png
ADDED
|
Git LFS Details
|
examples/source_9.png
ADDED
|
Git LFS Details
|