Spaces:
Paused
Paused
Download app.py from JohnSystems/bot: direct link, hf CLI and curl.
- Browser
- Download file 441 Bytes
-
https://huggingface.co/spaces/JohnSystems/bot/resolve/main/app.py
- Command line
-
hf download hf://spaces/JohnSystems/bot/app.py
-
curl -L -o app.py https://huggingface.co/spaces/JohnSystems/bot/resolve/main/app.py
441 Bytes
| import gradio as gr | |
| def chatbot(text): | |
| if text == "Olá": | |
| return "Olá! Como posso ajudar?" | |
| elif text == "Como você está?": | |
| return "Estou bem, obrigado!" | |
| else: | |
| return "Não entendi. Pode repetir?" | |
| demo = gradio.Interface( | |
| fn=chatbot, | |
| inputs="text", | |
| outputs="text", | |
| title="Meu Chatbot", | |
| description="Um chatbot simples para conversar" | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() |