RMHalak commited on
Commit
5250b05
·
verified ·
1 Parent(s): 5259967

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import streamlit as st
2
- from transformers import pipeline
3
 
4
- pipe = pipeline('sentiment-analysis')
 
5
 
6
- text = st.text_area('Enter text')
7
 
8
  if text:
9
- out = pipe(text)
10
- st.json(out)
 
1
  import streamlit as st
 
2
 
3
+ with open('./trained_model.pkl', 'rb') as file:
4
+ loaded_model = pickle.load(file)
5
 
6
+ input = st.text_area('Enter text')
7
 
8
  if text:
9
+ out = loaded_model(input)
10
+ st.json(out[0][0])