Spaces:
Runtime error
Runtime error
File size: 701 Bytes
a3aecac |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import streamlit as st
from setfit import SetFitModel
l6_model = SetFitModel.from_pretrained("Bruno/intent-classification-pt-setfit-model")
st.title("A intenção classificada é")
Text = st.text_input("Enter the sentence")
@st.cache
def model_inference(text):
prediction = l6_model([text])
if prediction == 48:
return "alarm_set"
if prediction == 46:
return "audio_volume_mute"
if prediction == 1:
return "iot_hue_lightchange"
if prediction == 40:
return "iot_hue_lightoff"
if prediction == 34:
return "iot_cleaning"
else:
return "Others"
st.subheader('A intenção classificada é')
st.write(model_inference(Text)) |