gdnartea commited on
Commit
2ea68c5
·
verified ·
1 Parent(s): fb0a016

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -13,7 +13,7 @@ from nemo.collections.asr.models import ASRModel
13
  from nemo.collections.asr.parts.utils.streaming_utils import FrameBatchMultiTaskAED
14
  from nemo.collections.asr.parts.utils.transcribe_utils import get_buffered_pred_feat_multitaskAED
15
 
16
-
17
 
18
  torch.random.manual_seed(0)
19
  proc_model_name = "microsoft/Phi-3-mini-4k-instruct"
@@ -27,6 +27,7 @@ proc_model = AutoModelForCausalLM.from_pretrained(
27
  proc_model.to("cpu")
28
  proc_tokenizer = AutoTokenizer.from_pretrained(proc_model_name)
29
 
 
30
 
31
  SAMPLE_RATE = 16000 # Hz
32
  MAX_AUDIO_MINUTES = 10 # wont try to transcribe if longer than this
@@ -116,8 +117,8 @@ def generate_response(user_input):
116
 
117
  def CanaryPhi(audio_filepath):
118
  user_input = transcribe(audio_filepath)
119
- #response = generate_response(user_input)
120
- response = llama_pipe(user_input)
121
  return response
122
 
123
 
 
13
  from nemo.collections.asr.parts.utils.streaming_utils import FrameBatchMultiTaskAED
14
  from nemo.collections.asr.parts.utils.transcribe_utils import get_buffered_pred_feat_multitaskAED
15
 
16
+ available_memory()
17
 
18
  torch.random.manual_seed(0)
19
  proc_model_name = "microsoft/Phi-3-mini-4k-instruct"
 
27
  proc_model.to("cpu")
28
  proc_tokenizer = AutoTokenizer.from_pretrained(proc_model_name)
29
 
30
+ available_memory()
31
 
32
  SAMPLE_RATE = 16000 # Hz
33
  MAX_AUDIO_MINUTES = 10 # wont try to transcribe if longer than this
 
117
 
118
  def CanaryPhi(audio_filepath):
119
  user_input = transcribe(audio_filepath)
120
+ print(user_input)
121
+ response = generate_response(user_input)
122
  return response
123
 
124