import asyncio import logging from datetime import datetime import gradio as gr from agents import dispatch_agent # Import from dispatcher.py # Configure logging logging.basicConfig( level=logging.INFO, filename="dispatcher_agent.log", filemode="a", format="%(asctime)s - %(levelname)s - %(message)s", ) # Create the Gradio interface iface = gr.Interface( fn=lambda birthdate, location_born, current_city, personality_type: asyncio.run( dispatch_agent(birthdate, location_born, current_city, personality_type) ), inputs=[ gr.Date(label="Birthdate"), gr.Textbox(label="Location of Birth"), gr.Textbox(label="Current City"), gr.Textbox(label="Personality Type"), ], outputs=gr.Textbox(label="Horoscope"), title="✨ Your Daily Horoscope ✨", # Add a title description="Get your personalized horoscope based on your birthdate, location, and personality.", # Add a description ) # Launch the interface iface.launch()