from gradio_client import Client # Use the existing Hugging Face Space as the backend client = Client("saadkhi/SQL_chatbot_API") def chat(prompt: str) -> str: """Proxy the prompt to the remote Space /chat endpoint.""" return client.predict( prompt=prompt, api_name="/chat", ) if __name__ == "__main__": # Simple CLI test user_prompt = input("Enter your SQL question: ") print(chat(user_prompt))