File size: 485 Bytes
4759493
ff48e4d
4759493
ff48e4d
 
 
 
 
 
 
 
 
 
4a2a4fd
 
 
0a91e85
ff48e4d
4759493
4a2a4fd
 
ff48e4d
4a2a4fd
4759493
4a2a4fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import gradio as gr
import random

responses = [
    "Without a doubt.",
    "Outlook not so good.",
    "Ask again later.",
    "Yes, definitely!",
    "My sources say no.",
    "Signs point to yes.",
    "Don't count on it.",
    "It is certain.",
    "Very doubtful.",
    "Better not tell you now.",
    "No way.",
    "For sure!",
    "NEVER!!"
]

def magic_8_ball(message, history):
    return random.choice(responses)

chatbot = gr.ChatInterface(magic_8_ball)

chatbot.launch()