Abid commited on
Commit
ff54a19
β€’
1 Parent(s): d99ef6c

model path corrected

Browse files
Files changed (1) hide show
  1. Gradio/app.py +3 -3
Gradio/app.py CHANGED
@@ -11,13 +11,13 @@ hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "Urdu-ASR-flags")
11
 
12
  ############## DVC ################################
13
 
14
- PROD_MODEL_PATH = "Model"
15
 
16
  if os.path.isdir(".dvc"):
17
  print("Running DVC")
18
  # os.system("dvc config cache.type copy")
19
  # os.system("dvc config core.no_scm true")
20
- if os.system(f"dvc pull {PROD_MODEL_PATH} -r origin") != 0:
21
  exit("dvc pull failed")
22
  # os.system("rm -r .dvc")
23
  # .apt/usr/lib/dvc
@@ -27,7 +27,7 @@ if os.path.isdir(".dvc"):
27
 
28
  def asr(audio):
29
 
30
- asr = pipeline("automatic-speech-recognition", model=model)
31
  prediction = asr(audio, chunk_length_s=5, stride_length_s=1)
32
  return prediction
33
 
11
 
12
  ############## DVC ################################
13
 
14
+ Model = "Model"
15
 
16
  if os.path.isdir(".dvc"):
17
  print("Running DVC")
18
  # os.system("dvc config cache.type copy")
19
  # os.system("dvc config core.no_scm true")
20
+ if os.system(f"dvc pull {Model} -r origin") != 0:
21
  exit("dvc pull failed")
22
  # os.system("rm -r .dvc")
23
  # .apt/usr/lib/dvc
27
 
28
  def asr(audio):
29
 
30
+ asr = pipeline("automatic-speech-recognition", model=Model)
31
  prediction = asr(audio, chunk_length_s=5, stride_length_s=1)
32
  return prediction
33