ashrestha commited on
Commit
4791a7a
·
1 Parent(s): 81b6ae4
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -7,8 +7,8 @@ classifier = pipeline("zero-shot-classification",
7
  model="valhalla/distilbart-mnli-12-1")
8
 
9
  with st.form('inputs'):
10
- input_text = st.text_area("Enter your sample")
11
- input_label = st.text_input("Enter labels", placeholder="support, help, important")
12
  submit_button = st.form_submit_button(label='Submit')
13
 
14
  if submit_button:
@@ -16,4 +16,6 @@ if submit_button:
16
  labels = list(l.strip() for l in input_label.split(','))
17
  pred = classifier(input_text, labels, multi_class=True)
18
 
19
- st.markdown(pred)
 
 
 
7
  model="valhalla/distilbart-mnli-12-1")
8
 
9
  with st.form('inputs'):
10
+ input_text = st.text_area("Input text")
11
+ input_label = st.text_input("Labels", placeholder="support, help, important")
12
  submit_button = st.form_submit_button(label='Submit')
13
 
14
  if submit_button:
 
16
  labels = list(l.strip() for l in input_label.split(','))
17
  pred = classifier(input_text, labels, multi_class=True)
18
 
19
+ st.success(pred['label'])
20
+
21
+ # st.markdown(pred)