Spaces:
Sleeping
Sleeping
frankiePizza
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,20 @@ import streamlit as st
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
pipe = pipeline("sentiment-analysis")
|
|
|
5 |
text = st.text_area("Enter some text here")
|
6 |
|
7 |
if text:
|
8 |
out = pipe(text)
|
9 |
-
st.json(out)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
pipe = pipeline("sentiment-analysis")
|
5 |
+
st.title("Sentiment")
|
6 |
text = st.text_area("Enter some text here")
|
7 |
|
8 |
if text:
|
9 |
out = pipe(text)
|
10 |
+
st.json(out)
|
11 |
+
|
12 |
+
|
13 |
+
text_generator = pipeline("text-generation")
|
14 |
+
st.title("Text Generator")
|
15 |
+
input_text = st.text_area("Enter generator prompt: ")
|
16 |
+
|
17 |
+
if input_text:
|
18 |
+
st.json(text_generator(input_text))
|
19 |
+
|
20 |
+
|
21 |
+
|