talantbekdeveloper commited on
Commit
36979be
·
verified ·
1 Parent(s): ba0f146

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -1,15 +1,14 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
- transcriber = pipeline(model="openai/whisper-large-v2", device=0, batch_size=2)
5
- audio_filenames = [f"https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/{i}.flac" for i in range(1, 5)]
6
- texts = transcriber(audio_filenames)
7
 
8
- st.write(texts)
 
 
9
 
10
- # transcriber = pipeline(task="sentiment-analysis")
11
- # text = st.text_input('Label', 'enter some text!')
12
-
13
- # if text:
14
- # out = transcriber(text)
15
- # st.json(out)
 
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
+ transcriber = pipeline(task="sentiment-analysis")
5
+ text = st.text_input('Label', 'enter some text!')
 
6
 
7
+ if text:
8
+ out = transcriber(text)
9
+ st.json(out)
10
 
11
+ st.file_uploader("Choose a CSV file", accept_multiple_files=True)
12
+ bytes_data = uploaded_file.read()
13
+ st.write("filename:", uploaded_file.name)
14
+ st.write(bytes_data)