ashrestha commited on
Commit
8f8b328
1 Parent(s): 1a80035
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -1,6 +1,17 @@
1
  import streamlit as st
2
 
 
 
 
 
 
 
3
 
4
  input_text = st.text_area("Enter your sample")
5
- input_label = st.text_input("support, help, important")
 
 
 
 
6
 
 
 
1
  import streamlit as st
2
 
3
+ from transformers import pipeline
4
+
5
+
6
+ classifier = pipeline("zero-shot-classification",
7
+ model="valhalla/distilbart-mnli-12-1")
8
+
9
 
10
  input_text = st.text_area("Enter your sample")
11
+ input_label = st.text_input("Enter labels", placeholder="support, help, important")
12
+
13
+ labels = input_label.split(',')
14
+
15
+ pred = classifier(input_text, labels, multi_class=True)
16
 
17
+ st.markdown(pred)