Maxson52 commited on
Commit
a6c03b1
·
1 Parent(s): ffae450

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1,5 +1,12 @@
 
1
  from transformers import pipeline
2
  classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
3
 
 
 
 
 
4
  categories = ['lifestyle', 'technology', 'entertainment', 'news']
5
- classifier(text, categories, multi_class=True)
 
 
 
1
+ import streamlit as st
2
  from transformers import pipeline
3
  classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
4
 
5
+ st.title("What's the category?")
6
+
7
+ text = st.text_input("Enter words")
8
+
9
  categories = ['lifestyle', 'technology', 'entertainment', 'news']
10
+ res = classifier(text, categories)
11
+
12
+ st.markdown(f'Well here you go: {res}')