from datasets import load_dataset from setfit import SetFitModel, Trainer, TrainingArguments, sample_dataset import streamlit as st fine_tuned_model = SetFitModel.from_pretrained("./my-setfit-finetuned-model") st.title("This is a sentiment analysis of a sentence") title = st.text_input("Sentiment of sentence", "I hate this") new_preds = fine_tuned_model.predict(title) st.write("The current sentiment of this sentence is", new_preds)