Spaces:
Sleeping
Sleeping
App.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# Load your model
|
5 |
+
model_name = "yash072/Whisper_Smal_FineTuned_Hindi"
|
6 |
+
pipe = pipeline("automatic-speech-recognition", model=model_name)
|
7 |
+
|
8 |
+
def transcribe(audio_file):
|
9 |
+
result = pipe(audio_file)
|
10 |
+
return result["text"]
|
11 |
+
|
12 |
+
st.title("Whisper Small Fine-Tuned for Hindi")
|
13 |
+
|
14 |
+
audio_file = st.file_uploader("Upload an audio file", type=["wav", "mp3", "ogg"])
|
15 |
+
|
16 |
+
if audio_file is not None:
|
17 |
+
transcription = transcribe(audio_file)
|
18 |
+
st.write("Transcription:")
|
19 |
+
st.write(transcription)
|