SefyanKehail commited on
Commit
80284bf
·
1 Parent(s): 03615e7

debugging..

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -46,9 +46,9 @@ def get_file_size_in_mb(file_path):
46
  # print(f"{filename} downloaded successfully.")
47
 
48
 
49
- print(get_file_size_in_mb("hubert.pt"))
50
- print(get_file_size_in_mb("acoustic.pt"))
51
- print(get_file_size_in_mb("hifigan.pt"))
52
 
53
  # Load the models using torch.hub
54
  # hubert = torch.hub.load("bshall/hubert:main", "hubert_soft", trust_repo=True, pretrained=False)
@@ -58,23 +58,23 @@ print(get_file_size_in_mb("hifigan.pt"))
58
  # hubert, acoustic, hifigan = None, None, None
59
 
60
  # Load the state dictionaries from the CPU-saved files
61
- hubert_state_dict = torch.load("hubert.pt")
62
- acoustic_state_dict = torch.load("acoustic.pt")
63
- hifigan_state_dict = torch.load("hifigan.pt")
64
-
65
- print(hubert_state_dict)
66
- print(acoustic_state_dict)
67
- print(hifigan_state_dict)
68
- exit
69
- # Set the state dictionaries to the models
70
- hubert.load_state_dict(hubert_state_dict)
71
- acoustic.load_state_dict(acoustic_state_dict)
72
- hifigan.load_state_dict(hifigan_state_dict)
73
-
74
- # Move models to CPU (if not already on CPU)
75
- hubert = hubert.to('cpu')
76
- acoustic = acoustic.to('cpu')
77
- hifigan = hifigan.to('cpu')
78
 
79
  # Function to initialize models with CUDA
80
  # def initialize_models():
 
46
  # print(f"{filename} downloaded successfully.")
47
 
48
 
49
+ # print(get_file_size_in_mb("hubert.pt"))
50
+ # print(get_file_size_in_mb("acoustic.pt"))
51
+ # print(get_file_size_in_mb("hifigan.pt"))
52
 
53
  # Load the models using torch.hub
54
  # hubert = torch.hub.load("bshall/hubert:main", "hubert_soft", trust_repo=True, pretrained=False)
 
58
  # hubert, acoustic, hifigan = None, None, None
59
 
60
  # Load the state dictionaries from the CPU-saved files
61
+ hubert= torch.load("hubert.pt")
62
+ acoustic= torch.load("acoustic.pt")
63
+ hifigan= torch.load("hifigan.pt")
64
+
65
+ # print(hubert_state_dict)
66
+ # print(acoustic_state_dict)
67
+ # print(hifigan_state_dict)
68
+ # # Set the state dictionaries to the models
69
+
70
+ # hubert.load_state_dict(hubert_state_dict)
71
+ # acoustic.load_state_dict(acoustic_state_dict)
72
+ # hifigan.load_state_dict(hifigan_state_dict)
73
+
74
+ # # Move models to CPU (if not already on CPU)
75
+ # hubert = hubert.to('cpu')
76
+ # acoustic = acoustic.to('cpu')
77
+ # hifigan = hifigan.to('cpu')
78
 
79
  # Function to initialize models with CUDA
80
  # def initialize_models():