| import gradio as gr | |
| import requests | |
| def respond( | |
| message, | |
| history: list[tuple[str, str]], | |
| ): | |
| resp = requests.get("https://huggingface.co") | |
| return str(resp.status_code) | |
| """ | |
| For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface | |
| """ | |
| demo = gr.ChatInterface( | |
| respond, | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() | |