Spaces:
Runtime error
Runtime error
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("
|
11 |
-
input_label = st.text_input("
|
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.
|
|
|
|
|
|
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)
|