HimanshuA commited on
Commit
917cad2
1 Parent(s): ff18323

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+
4
+
5
+ import streamlit as st
6
+ from transformers import pipeline
7
+
8
+ pipe = pipeline("text-classification", model="cardiffnlp/twitter-roberta-base-emotion")
9
+
10
+ text = st.text_area('Enter some text: ')
11
+ if text:
12
+ out = pipe(text)
13
+ st.json(out)