import streamlit as st from transformers import pipeline x = st.slider('Select a value') st.write(x, 'squared is', x * x) # read about the model here: Model from https://huggingface.co/chbh7051/vit-driver-drowsiness-detection model_name = "chbh7051/vit-driver-drowsiness-detection" # the pipeline can be different things like classification, sentiment, or text-generation, question-answering pipe = pipeline( task="text-classification", model=model_name, top_k=None) # this is the text input box for the user input_text = st.text_area('Tell me how your day was and I will guess how you are feeling...') # if text means, if the variable text is not empty then run below if input_text: out = pipe(input_text) st.json(out)