Download app.py from adough/KWKFirst: direct link, hf CLI and curl.
- Browser
- Download file 694 Bytes
-
https://huggingface.co/spaces/adough/KWKFirst/resolve/main/app.py
- Command line
-
hf download hf://spaces/adough/KWKFirst/app.py
-
curl -L -o app.py https://huggingface.co/spaces/adough/KWKFirst/resolve/main/app.py
694 Bytes
| import gradio as gr | |
| import random | |
| #def echo(message,history) | |
| #return message | |
| def eightBall(message, history): | |
| responses = ["yes","withought a doubt","it is certain","it is decidedly so","yes definetly","most likely","outlook good","as I see it yes","signs point to yes","very doubtful","my reply is no","don't count on it","outlook not so good","better not tell you now","my sources say no","ask again later","reply hazy try again","concentrate and ask again","cannot predict now"] | |
| return random.choice(responses) | |
| chatbot = gr.ChatInterface(eightBall, type = "messages", title = "answer bot", description = "this ChatBot answers any yes no question you ask it") | |
| chatbot.launch() |