import streamlit as st from transformers import AutoTokenizer, AutoModelForSequenceClassification from home import render_home from scipy.special import softmax # Load the TinyBERT model and tokenizer model_path = "petermutwiri/Tiny_Bert_Cupstone" model = AutoModelForSequenceClassification.from_pretrained(model_path) tokenizer = AutoTokenizer.from_pretrained(model_path) # Create a sidebar for navigation and review examples st.sidebar.title("Navigation and review examples") # Use the selected page function to display the content page = st.sidebar.radio("Go to", ["Home"]) if page == "Home": render_home(model, tokenizer) # An example for a positive movie review st.sidebar.markdown("👍 **Positive Review Example:**") st.sidebar.markdown("> I absolutely loved this movie! It was so thrilling and captivating. The acting was superb, and the plot was fantastic.") # An example for a negative movie review st.sidebar.markdown("👎 **Negative Review Example:**") st.sidebar.markdown("> This movie was a complete disappointment. The story was boring, and the acting was terrible. I wouldn't recommend it to anyone.")