jhj0517
commited on
Commit
•
699c0d5
1
Parent(s):
ab6505a
add arg to enable model download at start
Browse files
app.py
CHANGED
@@ -17,7 +17,8 @@ class App:
|
|
17 |
model_dir=args.model_dir,
|
18 |
output_dir=args.output_dir
|
19 |
)
|
20 |
-
|
|
|
21 |
|
22 |
def musepose_demo(self):
|
23 |
with gr.Blocks() as demo:
|
@@ -93,6 +94,7 @@ if __name__ == "__main__":
|
|
93 |
parser = argparse.ArgumentParser()
|
94 |
parser.add_argument('--model_dir', type=str, default=os.path.join("pretrained_weights"), help='Pretrained models directory for MusePose')
|
95 |
parser.add_argument('--output_dir', type=str, default=os.path.join("assets", "videos"), help='Output directory for the result')
|
|
|
96 |
args = parser.parse_args()
|
97 |
|
98 |
app = App(args=args)
|
|
|
17 |
model_dir=args.model_dir,
|
18 |
output_dir=args.output_dir
|
19 |
)
|
20 |
+
if not args.disable_model_download_at_start:
|
21 |
+
download_models(model_dir=args.model_dir)
|
22 |
|
23 |
def musepose_demo(self):
|
24 |
with gr.Blocks() as demo:
|
|
|
94 |
parser = argparse.ArgumentParser()
|
95 |
parser.add_argument('--model_dir', type=str, default=os.path.join("pretrained_weights"), help='Pretrained models directory for MusePose')
|
96 |
parser.add_argument('--output_dir', type=str, default=os.path.join("assets", "videos"), help='Output directory for the result')
|
97 |
+
parser.add_argument('--disable_model_download_at_start', type=bool, default=False, nargs='?', const=True, help='Disable model download at start or not')
|
98 |
args = parser.parse_args()
|
99 |
|
100 |
app = App(args=args)
|