ferguch9 commited on
Commit
08a9420
·
1 Parent(s): 2c87b44
Files changed (2) hide show
  1. app.py +10 -1
  2. requirements.txt +2 -0
app.py CHANGED
@@ -1,4 +1,13 @@
1
  import streamlit as st
 
2
 
3
  x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ import transformers import pipelines
3
 
4
  x = st.slider('Select a value')
5
+ st.write(x, 'squared is', x * x)
6
+
7
+ pipe = pipeline('sentiment-analysis')
8
+ text = st.text_area('enter some text')
9
+
10
+ if text:
11
+ out = pipe(text)
12
+ st.json(out)
13
+
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ torch
2
+ transformers