File size: 1,011 Bytes
de7f957
 
 
a89bf70
 
 
 
 
 
 
1455c2a
18bf1eb
 
 
 
c3105f1
1455c2a
 
c3105f1
 
de7f957
1455c2a
c3105f1
 
 
b28ac3b
1455c2a
18bf1eb
72aa911
b28ac3b
 
 
ead954e
72aa911
 
ead954e
1455c2a
 
 
ead954e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import streamlit as st
from transformers import pipeline

#def load_summarizer():#
 #   whisper = pipeline('automatic-speech-recognition') #audio-to-text
  #  summarize = pipeline("summarization", device=0)
   # senti = pipeline("sentiment-analysis",device=0)
    #nameentity = pipeline("ner",device=0)
    #translate = pipeline("translation", device=0)
    #return whisper, summarize, senti, nameentity, translate

st.subheader("Choose a mp3 file that you extracted from the work site")
uploaded_file = st.file_uploader("Select file from your directory")
if uploaded_file is not None:
    audio_bytes = uploaded_file.read()
    text = st.audio(audio_bytes, format='audio/mp3')


pipe = pipeline("automatic-speech-recognition")
#text = st.text_area('Enter some Text!')


#summarizer = load_summarizer()
#st.title("Summarize Text")
#sentence = st.text_area('Please paste your article :', height=30)
button = st.button("Click")



if text:
    out=pipe(text)
    st.json(out)