sergioska commited on
Commit
b410f0d
·
1 Parent(s): 91c7c45

playing with whisper

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -2,9 +2,9 @@ import streamlit as st
2
  # Load model directly
3
  from transformers import pipeline
4
 
5
- classifier = pipeline("sentiment-analysis")
6
 
7
- prompt = st.chat_input("Say something")
8
- if prompt:
9
- output = classifier(prompt)
10
- st.write(f"User has sent the following prompt: {output}")
 
2
  # Load model directly
3
  from transformers import pipeline
4
 
5
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")
6
 
7
+ uploaded_file = st.file_uploader("Choose a file")
8
+ if uploaded_file is not None:
9
+ result = pipe(uploaded_file)
10
+ st.write(result)