File size: 540 Bytes
2f880d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import streamlit as st
from transformers import pipeline

# Load your model
model_name = "yash072/Whisper_Smal_FineTuned_Hindi"
pipe = pipeline("automatic-speech-recognition", model=model_name)

def transcribe(audio_file):
    result = pipe(audio_file)
    return result["text"]

st.title("Whisper Small Fine-Tuned for Hindi")

audio_file = st.file_uploader("Upload an audio file", type=["wav", "mp3", "ogg"])

if audio_file is not None:
    transcription = transcribe(audio_file)
    st.write("Transcription:")
    st.write(transcription)