Muhammadidrees commited on
Commit
fcfc08e
·
verified ·
1 Parent(s): 15feda4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -14,6 +14,18 @@ except Exception as e:
14
  print(f"GPU warmup failed: {e}")
15
  os.environ["GRADIO_TEMP_DIR"] = "./tmp"
16
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  pipe,fantasytalking,wav2vec_processor,wav2vec = None,None,None,None
18
  @spaces.GPU(duration=1200)
19
  def generate_video(
@@ -53,17 +65,7 @@ def generate_video(
53
  seed=seed,
54
  )
55
 
56
- try:
57
- global pipe, fantasytalking, wav2vec_processor, wav2vec
58
-
59
- pipe,fantasytalking,wav2vec_processor,wav2vec = load_models(args)
60
- output_path=main(
61
- args,pipe,fantasytalking,wav2vec_processor,wav2vec
62
- )
63
- return output_path # Ensure the output path is returned
64
- except Exception as e:
65
- print(f"Error during processing: {str(e)}")
66
- raise gr.Error(f"Error during processing: {str(e)}")
67
 
68
 
69
  def create_args(
 
14
  print(f"GPU warmup failed: {e}")
15
  os.environ["GRADIO_TEMP_DIR"] = "./tmp"
16
 
17
+ try:
18
+ global pipe, fantasytalking, wav2vec_processor, wav2vec
19
+
20
+ pipe,fantasytalking,wav2vec_processor,wav2vec = load_models(args)
21
+ output_path=main(
22
+ args,pipe,fantasytalking,wav2vec_processor,wav2vec
23
+ )
24
+ return output_path # Ensure the output path is returned
25
+ except Exception as e:
26
+ print(f"Error during processing: {str(e)}")
27
+ raise gr.Error(f"Error during processing: {str(e)}")
28
+
29
  pipe,fantasytalking,wav2vec_processor,wav2vec = None,None,None,None
30
  @spaces.GPU(duration=1200)
31
  def generate_video(
 
65
  seed=seed,
66
  )
67
 
68
+
 
 
 
 
 
 
 
 
 
 
69
 
70
 
71
  def create_args(