import gradio as gr # pyre-ignore[21] from databot import DataBot # pyre-ignore[21] print("Starting DataBot...") bot = DataBot() print("DataBot ready!\n") def respond(message, history): """Handle a user message and return the bot's response.""" if not message.strip(): return "" return bot.ask(message) demo = gr.ChatInterface( fn=respond, title="🤖 DataBot", description="Your intelligent ERP database assistant. Ask questions about your business data in English or French.", examples=[ "How many products are there?", "Combien y a-t-il d'articles ?", "Show me the top 10 partners", "What are the recent sales?", ], theme=gr.themes.Soft(), ) if __name__ == "__main__": demo.launch()