import streamlit as st import numpy as np from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing.text import Tokenizer from tensorflow.keras.preprocessing.sequence import pad_sequences import pickle # Load the LSTM model lstm_model = load_model('lstm.h5') # Load the Tokenizer used during training with open('tokenizer.pkl', 'rb') as tokenizer_file: tokenizer = pickle.load(tokenizer_file) # Define class labels and their numerical mapping class_mapping = {"Angry": 0, "Sad": 1, "Joy": 2, "Surprise": 3} numerical_to_label = {v: k for k, v in class_mapping.items()} st.title('VibeConnect') st.markdown( """ """, unsafe_allow_html=True ) # Define the emojis you want to use emojis = ["🤣","🥲","🥹","😇","😍","😋","🤪","🤩","🥳","😭","😡","😦","😧","😮","🥴","🤮","🤧","😷"] # Create a string of emojis to use as the background background_emojis = " ".join(emojis * 10) # Repeat the emojis to cover the background # Use HTML and CSS to set the background background_style = f"""