Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from agents import Runner | |
| from agent import agent | |
| async def run_agent(message, history): | |
| input_list = [{"role": msg["role"], "content": msg["content"]} for msg in history] | |
| input_list.append({"role": "user", "content": message}) | |
| result = await Runner.run(agent, input_list) | |
| return result.final_output | |
| gr.ChatInterface( | |
| fn=run_agent, | |
| type="messages", | |
| title='Valiente Assistant', | |
| description='Valiente Assistant is an AI agent that will guide you through your branding brief.', | |
| theme=gr.themes.Default(), | |
| ).launch(auth=("sebastianpelaez", "w$DkU6$uRduC"), ssr_mode=False) | |