wedyanessam commited on
Commit
93d986f
ยท
verified ยท
1 Parent(s): fa13218

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -7
app.py CHANGED
@@ -59,13 +59,20 @@ print("โœ… ุชู… ุงู„ุชุญู…ูŠู„!")
59
 
60
  # โœ… ุชูˆู„ูŠุฏ ููŠุฏูŠูˆ
61
  def generate_video(image_path, audio_path, prompt, output_dir="./output"):
62
- args = argparse.Namespace(
63
- **vars(args_template),
64
- image_path=image_path,
65
- audio_path=audio_path,
66
- prompt=prompt,
67
- output_dir=output_dir
68
- )
 
 
 
 
 
 
 
69
  return main(args, pipe, fantasytalking, wav2vec_processor, wav2vec)
70
 
71
  # โœ… ุฎุท ุงู„ุฃู†ุงุจูŠุจ ุงู„ูƒุงู…ู„
 
59
 
60
  # โœ… ุชูˆู„ูŠุฏ ููŠุฏูŠูˆ
61
  def generate_video(image_path, audio_path, prompt, output_dir="./output"):
62
+ # ุงู†ุณุฎูŠ args_template ุฅู„ู‰ dict ุนุดุงู† ู†ุนุฏู„ ุนู„ูŠู‡ ุจุณู‡ูˆู„ุฉ
63
+ args_dict = vars(args_template).copy()
64
+
65
+ # ู†ุญุฏุซ ูู‚ุท ุงู„ู„ูŠ ู†ุญุชุงุฌู‡
66
+ args_dict.update({
67
+ "image_path": image_path,
68
+ "audio_path": audio_path,
69
+ "prompt": prompt,
70
+ "output_dir": output_dir
71
+ })
72
+
73
+ # ู†ุญูˆู„ ู…ู† dict ุฅู„ู‰ argparse.Namespace
74
+ args = argparse.Namespace(**args_dict)
75
+
76
  return main(args, pipe, fantasytalking, wav2vec_processor, wav2vec)
77
 
78
  # โœ… ุฎุท ุงู„ุฃู†ุงุจูŠุจ ุงู„ูƒุงู…ู„