eddiegulay commited on
Commit
b451d48
1 Parent(s): b3c2544

Model to CUDA

Browse files
Files changed (1) hide show
  1. README.md +5 -0
README.md CHANGED
@@ -43,6 +43,11 @@ repo_name = "eddiegulay/wav2vec2-large-xlsr-mvc-swahili"
43
  processor = AutoProcessor.from_pretrained(repo_name)
44
  model = AutoModelForCTC.from_pretrained(repo_name)
45
 
 
 
 
 
 
46
  def transcribe(audio_path):
47
  # Load the audio file
48
  audio_input, sample_rate = torchaudio.load(audio_path)
 
43
  processor = AutoProcessor.from_pretrained(repo_name)
44
  model = AutoModelForCTC.from_pretrained(repo_name)
45
 
46
+ # if you have GPU
47
+ # move model to CUDA
48
+ model = model.to("cuda")
49
+
50
+
51
  def transcribe(audio_path):
52
  # Load the audio file
53
  audio_input, sample_rate = torchaudio.load(audio_path)