Spaces:
Sleeping
Sleeping
Download app.py from TeahReichenbaum/FirstChatBot: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/spaces/TeahReichenbaum/FirstChatBot/resolve/1edb78dd60d33feeb49eea20eb64ee0acd7b9bed/app.py
- Command line
-
hf download hf://spaces/TeahReichenbaum/FirstChatBot@1edb78dd60d33feeb49eea20eb64ee0acd7b9bed/app.py
-
curl -L -o app.py https://huggingface.co/spaces/TeahReichenbaum/FirstChatBot/resolve/1edb78dd60d33feeb49eea20eb64ee0acd7b9bed/app.py
678 Bytes
| import gradio as gr | |
| import random | |
| # def echo (message, hisotry) | |
| # return (message) | |
| # def yesNoRandom(message,history): | |
| # repsonse=["yes","no"] | |
| # return random.choice(repsonse) | |
| # chatbot = gr.ChatInterface(yesNoRandom, type = "messages", title = "Yes or No Bot", description = "This chatbot randomly repsonds to questions with yes or no.") | |
| def magicEightBall(message,history): | |
| response=["It's certain", "Try Again", "Chances are low", "Yes", "no", "Unlikley", "likley","Ask later"] | |
| return random.choice(response) | |
| chatbot=gr.ChatInterface(magicEightBall, type="messages", title,"Magic eight Ball",theme='d8ahazard/material_design_rd') | |
| chatbot.launch() |