Nattyboi commited on
Commit
bf71f96
·
1 Parent(s): d70d1a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -3,8 +3,20 @@ import streamlit
3
 
4
  from transformers.pipelines import pipeline
5
 
6
- pipe = pipeline(model="KELONMYOSA/wav2vec2-xls-r-300m-emotion-ru", trust_remote_code=True)
7
 
8
- # The pipeline input can be a file, path or link
9
- result = pipe("DC_a01.wav")
10
- streamlit.write(result)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  from transformers.pipelines import pipeline
5
 
 
6
 
7
+ # Use a pipeline as a high-level helper
8
+
9
+
10
+ pipe = pipeline("zero-shot-classification", model="knowledgator/comprehend_it-base")
11
+
12
+ candidate_labels = ['travel', 'cooking', 'dancing', 'exploration']
13
+ st.write(classifier(sequence_to_classify, candidate_labels, multi_label=True))
14
+ #{'labels': ['travel', 'exploration', 'dancing', 'cooking'],
15
+ # 'scores': [0.9945111274719238,
16
+ # 0.9383890628814697,
17
+ # 0.0057061901316046715,
18
+ # 0.0018193122232332826],
19
+ # 'sequence': 'one day I will see the world'}
20
+
21
+
22
+