yash072 commited on
Commit
2f880d2
·
verified ·
1 Parent(s): 4c74c7d
Files changed (1) hide show
  1. app.py +19 -0
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)