RMHalak's picture
Update app.py
9ae8083 verified
raw
history blame
342 Bytes
import streamlit as st
import pandas as pd
import pickle
with open('./trained_model.pkl', 'rb') as file:
loaded_model = pickle.load(file)
new_pred = st.text_area('Enter text')
if new_pred:
new_pred_processed = generate_features(pd.DataFrame([new_pred]), prod=True)
out = loaded_model(new_pred_processed)
st.json(out[0][0])