TEST_32 / app.py
Ina-Shapiro's picture
Update app.py
ec837b6 verified
import streamlit as st
from smolagents import CodeAgent, HfApiModel
import os
st.set_page_config(page_title="AI Agents", page_icon="🤖")
def main():
st.title("🤖 Good evening, Ina Shapiro")
# Simple working agents without complex tools first
agents = {
"Chat Agent": "A simple chat agent",
"Helper Agent": "A helpful assistant agent"
}
selected_agent = st.selectbox(
"Please select an Agent",
options=list(agents.keys()),
index=None,
placeholder="Choose an agent..."
)
if selected_agent:
st.success(f"✅ Selected: {selected_agent}")
user_input = st.text_input("Enter your message:")
if user_input:
with st.spinner("Agent is thinking..."):
try:
# Simple response for now
response = f"Hello! I'm the {selected_agent}. You said: '{user_input}'. How can I help you?"
st.write("**Agent Response:**")
st.write(response)
except Exception as e:
st.error(f"Error: {str(e)}")
if __name__ == "__main__":
main()
# Add custom CSS for background color
custom_css = """
import gradio as gr
import os
# Custom CSS for background color
custom_css = """
body, html {
background-color: #ead5d2 !important;
}
.gradio-container, .app, .main-content {
background-color: #ead5d2 !important;
}
/* Override any dark theme styles */
.dark body, .dark html {
background-color: #ead5d2 !important;
}
/* Ensure text is readable on the new background */
.text-white {
color: #333333 !important;
}
.text-gray-800 {
color: #444444 !important;
}
"""
# Apply the custom CSS to your Gradio interface
with gr.Blocks(css=custom_css) as demo:
# Your existing LibreChat interface code here
pass
if __name__ == "__main__":
demo.launch()
# Apply the custom CSS (this will depend on how your app.py is structured)