File size: 678 Bytes
fc5793f
0a698fb
8c58c03
db7b22d
 
 
74c0037
 
 
8c58c03
74c0037
 
1edb78d
74c0037
 
 
8c58c03
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()