Spaces:
Sleeping
Sleeping
Download app_old.txt from saadkhi/SQL_chatbot_API: direct link, hf CLI and curl.
- Browser
- Download file 440 Bytes
-
https://huggingface.co/spaces/saadkhi/SQL_chatbot_API/resolve/main/app_old.txt
- Command line
-
hf download hf://spaces/saadkhi/SQL_chatbot_API/app_old.txt
-
curl -L -o app_old.txt https://huggingface.co/spaces/saadkhi/SQL_chatbot_API/resolve/main/app_old.txt
440 Bytes
| 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)) | |