import os import streamlit as st from langchain.prompts import ChatPromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate from langchain_huggingface import HuggingFaceEndpoint, HuggingFacePipeline, ChatHuggingFace os.environ["HUGGINGFACEHUB_API_TOKEN"] = os.getenv("key") os.environ["HF_TOKEN"] = os.getenv("key") st.set_page_config(page_title="Innomatics Online Trainer Bot", page_icon="🧠", layout="centered") st.markdown(""" """, unsafe_allow_html=True) st.markdown("

Innomatics AI Mentor Bot 🧠

", unsafe_allow_html=True) st.markdown("### 👋 Welcome to the Innomatics AI Mentor Bot 🤖") st.markdown(''' This dashboard provides an AI mentor that gives instant, skill-adapted help with Python, SQL, PowerBI, and data science to guide you through module doubts. ''') st.markdown("## In which module do you have doubt?") col1, col2, col3 = st.columns(3) with col1: python_btn = st.button("🐍 Python", key="python_btn", help="Get help with Python programming") with col2: sql_btn = st.button("🗃️ SQL", key="sql_btn", help="Get help with SQL databases") with col3: powerbi_btn = st.button("📊 PowerBI", key="powerbi_btn", help="Get help with PowerBI dashboards") col4, col5, col6 = st.columns(3) with col4: stats_btn = st.button("📈 Statistics", key="stats_btn", help="Get help with Statistics") with col5: ml_btn = st.button("🤖 Machine Learning", key="ml_btn", help="Get help with Machine Learning") with col6: dl_btn = st.button("🧠 Deep Learning", key="dl_btn", help="Get help with Deep Learning") # Initialize session state for mentor type if it doesn't exist if 'mentor_type' not in st.session_state: st.session_state.mentor_type = None if 'mentor_emoji' not in st.session_state: st.session_state.mentor_emoji = "🧠" # Set mentor type based on button clicks if python_btn: st.session_state.mentor_type = "Python" st.session_state.mentor_emoji = "🐍" elif sql_btn: st.session_state.mentor_type = "SQL" st.session_state.mentor_emoji = "🗃️" elif powerbi_btn: st.session_state.mentor_type = "PowerBI" st.session_state.mentor_emoji = "📊" elif stats_btn: st.session_state.mentor_type = "Statistics"