Spaces:
Runtime error
Runtime error
File size: 2,000 Bytes
2353d31 5747d7c 2353d31 50b02c3 2353d31 5747d7c 50b02c3 5747d7c 50b02c3 2353d31 5747d7c 2353d31 50b02c3 5747d7c 2353d31 5747d7c 2353d31 010497c ec837b6 010497c ec837b6 010497c ec837b6 010497c ec837b6 010497c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
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) |