Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
|
|
|
|
|
|
|
|
| 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}')
|