kingabzpro commited on
Commit
1696f82
β€’
1 Parent(s): 2665c6b

Update Gradio/app.py

Browse files
Files changed (1) hide show
  1. Gradio/app.py +2 -2
Gradio/app.py CHANGED
@@ -20,11 +20,11 @@ Model = "kingabzpro/wav2vec2-large-xls-r-300m-Urdu"
20
 
21
  ############## Inference ##############################
22
 
23
- device = 0 if torch.cuda.is_available() else "cpu"
24
  def asr(audio):
25
 
26
  asr = pipeline("automatic-speech-recognition", model=Model)
27
- prediction = asr(audio, chunk_length_s=30, device=device)
28
  return unicodedata.normalize("NFC",prediction["text"])
29
 
30
 
 
20
 
21
  ############## Inference ##############################
22
 
23
+
24
  def asr(audio):
25
 
26
  asr = pipeline("automatic-speech-recognition", model=Model)
27
+ prediction = asr(audio, chunk_length_s=30)
28
  return unicodedata.normalize("NFC",prediction["text"])
29
 
30