piyushgrover commited on
Commit
084272f
·
verified ·
1 Parent(s): 141c8fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -32,17 +32,18 @@ phi_new_model = "models/phi_adapter"
32
  phi_model = PeftModel.from_pretrained(phi_base_model, phi_new_model)
33
  phi_model = phi_model.merge_and_unload()
34
 
35
- compute_type = 'float32'
36
  if device != 'cpu':
37
- compute_type = 'float16'
38
 
39
- audi_model = whisperx.load_model("large-v2", device, compute_type=compute_type)
40
 
41
  tokenizer = AutoTokenizer.from_pretrained('microsoft/phi-2', trust_remote_code=True)
42
  tokenizer.pad_token = tokenizer.unk_token
43
 
44
 
45
  ### app functions ##
 
46
  context_added = False
47
  context = None
48
  context_type = ''
 
32
  phi_model = PeftModel.from_pretrained(phi_base_model, phi_new_model)
33
  phi_model = phi_model.merge_and_unload()
34
 
35
+ '''compute_type = 'float32'
36
  if device != 'cpu':
37
+ compute_type = 'float16''''
38
 
39
+ audi_model = whisperx.load_model("small", device, compute_type='float16')
40
 
41
  tokenizer = AutoTokenizer.from_pretrained('microsoft/phi-2', trust_remote_code=True)
42
  tokenizer.pad_token = tokenizer.unk_token
43
 
44
 
45
  ### app functions ##
46
+
47
  context_added = False
48
  context = None
49
  context_type = ''