Spaces:
Runtime error
Runtime error
| from databot import DataBot # pyre-ignore[21] | |
| def run_app(): | |
| # Initialize the DataBot engine | |
| print("Connecting to dev_poly database...") | |
| bot = DataBot() | |
| print("Type 'exit' to close the assistant.\n") | |
| while True: | |
| user_query = input("You: ") | |
| if user_query.lower() in ['exit', 'quit', 'bye']: | |
| print("Shutting down DataBot. Goodbye!") | |
| break | |
| if not user_query.strip(): | |
| continue | |
| # Get response from DataBot | |
| print("\nDataBot is thinking...") | |
| answer = bot.ask(user_query) | |
| print(f"\nAssistant: {answer}\n") | |
| print("-" * 20) | |
| if __name__ == "__main__": | |
| run_app() |