Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
|