snayan06's picture
adding code for model inferencing
558f904
raw
history blame contribute delete
462 Bytes
import streamlit as st
from setfit import SetFitModel
l6_model = SetFitModel.from_pretrained("nayan06/binary-classifier-conversion-intent-1.1-l6")
st.title("Conversion? Or Not?")
Text = st.text_input("Enter the sentence")
@st.cache
def model_inference(text):
prediction = l6_model([text])
if prediction == 1:
return "Intent-To-Convert"
else:
return "Others"
st.subheader('Classified Intent Is')
st.write(model_inference(Text))