import os import base64 import streamlit as st from langchain_core.messages import HumanMessage, AIMessage def get_base64_image(image_path): with open(image_path, 'rb') as img_file: return base64.b64encode(img_file.read()).decode() def create_interface(call_model): if 'chat_history' not in st.session_state: st.session_state.chat_history = [] # === Background Image === background_image_path = os.path.join(os.getcwd(), "src", "interface", "assets", "uwf-page-edited.jpg") print("DEBUG: Looking for background image at:", background_image_path) print("DEBUG: File exists?", os.path.exists(background_image_path)) if os.path.exists(background_image_path): base64_background_image = get_base64_image(background_image_path) st.markdown( f""" """, unsafe_allow_html=True ) # === Header Section === col1, col2 = st.columns([1, 3]) with col1: image_path = os.path.join(os.getcwd(), "src", "interface", "assets", "argie-argonaut-gif-edited.png") print("DEBUG: Looking for logo image at:", image_path) print("DEBUG: File exists?", os.path.exists(image_path)) if os.path.exists(image_path): st.image(image_path, width=200) with col2: st.markdown("
Ask ARGObot a variety of questions based on the Student Handbook.
- UWF's values
", unsafe_allow_html=True) st.markdown("- Student Rights and Responsibilities
", unsafe_allow_html=True) st.markdown("- UWF Policies and Regulations
", unsafe_allow_html=True) st.markdown("- UWF Appeals and Student Grievance Processes
", unsafe_allow_html=True) st.markdown("- Student Health and Wellbeing
", unsafe_allow_html=True) st.markdown("- Student Resources
", unsafe_allow_html=True) # === Chat Interface === chat_container = st.container() with chat_container: st.markdown("