File size: 1,464 Bytes
5f8d537
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from normal_chat import predict_normal
from friend_chat import predict_friend
from mentor_chat import predict_mentor
from therapy_chat import predict_therapy
from girlfriend_chat import predict_girlfriend
from boyfriend_chat import predict_boyfriend

import gradio as gr

with gr.Blocks() as demo:
    gr.Markdown("Welcome to Zenbot! 🤖")        
    
    with gr.Tab("Normal Chat"):
        Normalchat = gr.ChatInterface(
            fn = predict_normal,
            title = "Normal Chat",)
        
    with gr.Tab("Friend Chat"):
        Friendchat = gr.ChatInterface(
            fn=predict_friend,
            title="Friend Chat",
        )
    
    with gr.Tab("Therapy Chat"):
        Therapychat = gr.ChatInterface(
            predict_therapy,
            title="Therapy Chat",
        )
        
    with gr.Tab("Mentor Chat"):
        Mentorchat = gr.ChatInterface(
            predict_mentor,
            title="Mentor Chat",
        )
        
    with gr.Tab("Girlfriend Chat"):
        Girlfriendchat = gr.ChatInterface(
            predict_girlfriend,
            title="Girlfriend Chat",
        )
    
    with gr.Tab("Boyfriend Chat"):
        Boyfriendchat = gr.ChatInterface(
            predict_boyfriend,
            title="Boyfriend Chat",
        )
        
demo.launch(
    inbrowser = True,
    height = 600,
    inline = False,
    share = True,
    width = 800,
    debug=True,
)