Abid commited on
Commit
8b3f196
β€’
1 Parent(s): e698c7f

articel and des

Browse files
Files changed (1) hide show
  1. Gradio/app.py +44 -8
Gradio/app.py CHANGED
@@ -36,13 +36,49 @@ def asr(audio):
36
 
37
  title = "Urdu Automatic Speech Recognition"
38
 
39
- description = """This model is a fine-tuned version of facebook/wav2vec2-xls-r-300m on the common_voice dataset.
40
- <img src="https://huggingface.co/spaces/kingabzpro/Urdu-ASR-SOTA/resolve/main/Images/cover.jpg"
41
- alt="logo" width="550"/>"""
42
- article = """<p style='text-align: center'>
43
- <a href='https://dagshub.com/kingabzpro/Urdu-ASR-SOTA' target='_blank'>
44
- Source Code on DagsHub</a>
45
- </center></p>"""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  examples = [["Sample/sample1.mp3"], ["Sample/sample2.mp3"], ["Sample/sample3.mp3"]]
48
 
@@ -68,7 +104,7 @@ def main():
68
  description=description,
69
  article=article,
70
  examples=examples,
71
- theme="peach",
72
  )
73
 
74
  iface.launch(enable_queue=True)
36
 
37
  title = "Urdu Automatic Speech Recognition"
38
 
39
+ description = """
40
+ <p>
41
+ <center>
42
+ This model is a fine-tuned version of facebook/wav2vec2-xls-r-300m on the common_voice dataset.
43
+ <img src="https://huggingface.co/spaces/kingabzpro/Urdu-ASR-SOTA/resolve/main/Images/cover.jpg" alt="logo" width="550"/>
44
+ </center>
45
+ </p>
46
+ """
47
+
48
+ article = "<p style='text-align: center'><a href='https://dagshub.com/kingabzpro/Urdu-ASR-SOTA' target='_blank'>Source Code on DagsHub</a></p><p style='text-align: center'><a href='https://huggingface.co/blog/fine-tune-xlsr-wav2vec2' target='_blank'>Fine-tuning XLS-R for Multi-Lingual ASR with πŸ€— Transformers</a></p></center></p>"
49
+
50
+ examples = [
51
+ ["examples/00008.jpg"],
52
+ ["examples/00045.jpg"],
53
+ ]
54
+ favicon = "examples/favicon.ico"
55
+ thumbnail = "examples/SavtaDepth.png"
56
+
57
+
58
+ def main():
59
+ iface = gr.Interface(
60
+ gen,
61
+ gr.inputs.Image(shape=(640, 480), type="numpy"),
62
+ "image",
63
+ title=title,
64
+ flagging_options=["incorrect", "worst", "ambiguous"],
65
+ allow_flagging="manual",
66
+ flagging_callback=hf_writer,
67
+ description=description,
68
+ article=article,
69
+ examples=examples,
70
+ theme="peach",
71
+ allow_screenshot=True,
72
+ )
73
+
74
+ iface.launch(enable_queue=True)
75
+
76
+
77
+ # enable_queue=True,auth=("admin", "pass1234")
78
+
79
+ if __name__ == "__main__":
80
+ main()
81
+
82
 
83
  examples = [["Sample/sample1.mp3"], ["Sample/sample2.mp3"], ["Sample/sample3.mp3"]]
84
 
104
  description=description,
105
  article=article,
106
  examples=examples,
107
+ theme="grass",
108
  )
109
 
110
  iface.launch(enable_queue=True)