Spaces:
Sleeping
Sleeping
Download app.py from SonyaHas/ChatBotLabAug7: direct link, hf CLI and curl.
- Browser
- Download file 619 Bytes
-
https://huggingface.co/spaces/SonyaHas/ChatBotLabAug7/resolve/ac6d2f65ecd02d7eeb33cd385c8a2cbc19ce13bf/app.py
- Command line
-
hf download hf://spaces/SonyaHas/ChatBotLabAug7@ac6d2f65ecd02d7eeb33cd385c8a2cbc19ce13bf/app.py
-
curl -L -o app.py https://huggingface.co/spaces/SonyaHas/ChatBotLabAug7/resolve/ac6d2f65ecd02d7eeb33cd385c8a2cbc19ce13bf/app.py
619 Bytes
| import gradio as gr | |
| import random | |
| # import lines go at the top! Any libraries I need to import go up here^^ | |
| title: I am the your bestie | I18nData | None | |
| description: "I will serve you" | None | |
| def yes_or_no(message, history): | |
| return random.choice(['Yes', 'No', 'Of course', 'Try again', 'No, better luck next time!', "I think not", "Absolutely, yes!", ]) | |
| # def echo(message, history): | |
| # return message | |
| print("Hello World") | |
| chatbot = gr.ChatInterface(yes_or_no, type = "messages") | |
| # defining my chatbot so that the user can interact and see their conversation history and send new messages | |
| chatbot.launch() | |