Lingalingeswaran commited on
Commit
be47cb2
·
verified ·
1 Parent(s): 54ab573

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -1
README.md CHANGED
@@ -86,4 +86,38 @@ The following hyperparameters were used during training:
86
  - Transformers 4.45.2
87
  - Pytorch 2.4.1+cu121
88
  - Datasets 3.0.1
89
- - Tokenizers 0.20.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  - Transformers 4.45.2
87
  - Pytorch 2.4.1+cu121
88
  - Datasets 3.0.1
89
+ - Tokenizers 0.20.1
90
+
91
+
92
+ ## Example Usage
93
+
94
+ Here is an example of how to use the model for Tamil speech recognition with Gradio:
95
+
96
+ ```python
97
+ import gradio as gr
98
+ from transformers import pipeline
99
+
100
+ # Initialize the pipeline with the specified model
101
+ pipe = pipeline(model="Lingalingeswaran/whisper-small-ta")
102
+
103
+ def transcribe(audio):
104
+ # Transcribe the audio file to text
105
+ text = pipe(audio)["text"]
106
+ return text
107
+
108
+ # Create the Gradio interface
109
+
110
+ iface = gr.Interface(
111
+ fn=transcribe,
112
+ inputs=gr.Audio(sources=["microphone", "upload"], type="filepath"),
113
+ outputs="text",
114
+ title="Whisper Small Sinhala",
115
+ description="Realtime demo for Tamil speech recognition using a fine-tuned Whisper small model.",
116
+ )
117
+
118
+ # Launch the interface
119
+ if __name__ == "__main__":
120
+ iface.launch()
121
+
122
+
123
+