Spaces:
Sleeping
Sleeping
Commit
•
c39b894
1
Parent(s):
a6075c0
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,9 @@ from scripts.inference import inference_process
|
|
7 |
import argparse
|
8 |
import uuid
|
9 |
|
10 |
-
hallo_dir = snapshot_download(repo_id="fudan-generative-ai/hallo", local_dir="pretrained_models")
|
11 |
is_shared_ui = True if "multimodalart/hallo" in os.environ['SPACE_ID'] else False
|
|
|
|
|
12 |
|
13 |
def run_inference(source_image, driving_audio, progress=gr.Progress(track_tqdm=True)):
|
14 |
if is_shared_ui:
|
@@ -94,7 +95,7 @@ with gr.Blocks(css=css) as demo:
|
|
94 |
|
95 |
generate.click(
|
96 |
fn=run_inference,
|
97 |
-
|
98 |
outputs=output_video
|
99 |
)
|
100 |
|
|
|
7 |
import argparse
|
8 |
import uuid
|
9 |
|
|
|
10 |
is_shared_ui = True if "multimodalart/hallo" in os.environ['SPACE_ID'] else False
|
11 |
+
if(not is_shared_ui):
|
12 |
+
hallo_dir = snapshot_download(repo_id="fudan-generative-ai/hallo", local_dir="pretrained_models")
|
13 |
|
14 |
def run_inference(source_image, driving_audio, progress=gr.Progress(track_tqdm=True)):
|
15 |
if is_shared_ui:
|
|
|
95 |
|
96 |
generate.click(
|
97 |
fn=run_inference,
|
98 |
+
inputs=[avatar_face, driving_audio],
|
99 |
outputs=output_video
|
100 |
)
|
101 |
|