Spaces:
Running
Running
lym0302
commited on
Commit
·
d3e19f4
1
Parent(s):
9423df5
run_for_gradio
Browse files- app.py +1 -1
- pipeline/pipeline.py +2 -2
app.py
CHANGED
@@ -41,7 +41,7 @@ os.makedirs("pretrained/v2a/mmaudio", exist_ok=True)
|
|
41 |
setup_eval_logging()
|
42 |
pipeline = Pipeline(
|
43 |
step0_model_dir=repo_local_path,
|
44 |
-
step1_mode='
|
45 |
step2_model_dir=repo_local_path,
|
46 |
step2_mode='cot',
|
47 |
step3_mode='bs_roformer',
|
|
|
41 |
setup_eval_logging()
|
42 |
pipeline = Pipeline(
|
43 |
step0_model_dir=repo_local_path,
|
44 |
+
step1_mode='mmaudio_medium_44k',
|
45 |
step2_model_dir=repo_local_path,
|
46 |
step2_mode='cot',
|
47 |
step3_mode='bs_roformer',
|
pipeline/pipeline.py
CHANGED
@@ -89,7 +89,7 @@ class Pipeline:
|
|
89 |
"temp_final_video_path": None,
|
90 |
'log': ''}
|
91 |
|
92 |
-
step0_resp = self.
|
93 |
step0_resp_list = re.findall(r'(Step\d:.*?)(?=Step\d:|$)', step0_resp, re.DOTALL)
|
94 |
step_infos = [step_info.strip().split("\n")[0] for step_info in step0_resp_list]
|
95 |
step3_temp_dir = os.path.join(output_dir, "remove_vo")
|
@@ -108,7 +108,7 @@ class Pipeline:
|
|
108 |
yield step_results
|
109 |
|
110 |
elif step_info == 'Step2: Given a video and its generated audio, determine whether the audio contains voice-over.':
|
111 |
-
is_vo = self.
|
112 |
step_results["is_vo"] = is_vo
|
113 |
step_results['log'] = f"Step2 completed. Contain voice-over? {'Yes' if is_vo else 'No'}"
|
114 |
yield step_results
|
|
|
89 |
"temp_final_video_path": None,
|
90 |
'log': ''}
|
91 |
|
92 |
+
step0_resp = self.step02.run_step0(video_input)
|
93 |
step0_resp_list = re.findall(r'(Step\d:.*?)(?=Step\d:|$)', step0_resp, re.DOTALL)
|
94 |
step_infos = [step_info.strip().split("\n")[0] for step_info in step0_resp_list]
|
95 |
step3_temp_dir = os.path.join(output_dir, "remove_vo")
|
|
|
108 |
yield step_results
|
109 |
|
110 |
elif step_info == 'Step2: Given a video and its generated audio, determine whether the audio contains voice-over.':
|
111 |
+
is_vo = self.step02.run_step2(str(step_results["step1_video_path"]))
|
112 |
step_results["is_vo"] = is_vo
|
113 |
step_results['log'] = f"Step2 completed. Contain voice-over? {'Yes' if is_vo else 'No'}"
|
114 |
yield step_results
|