File size: 748 Bytes
a891433
 
0ae3d8e
 
 
 
 
 
a891433
0ae3d8e
 
 
 
 
 
 
 
a891433
0ae3d8e
a891433
 
0ae3d8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr

theme = gr.themes.Soft(
    primary_hue="zinc",
    secondary_hue="green",
    neutral_hue="blue",
    text_size=gr.themes.sizes.text_sm,
)

with gr.Blocks(theme=theme) as demo:
    with gr.Column():
        with gr.Accordion("Sistem Mesajları", open=False):
            system_msg = gr.Textbox(value="Sistemden mesajlar burada görüntülenecek.")
            new_msg = gr.Textbox(value="Yeni mesajınızı buraya yazın.")
        chatbot = gr.Chatbot(label='Trek Asistanı', elem_id="chatbot")
        inputs = gr.Textbox(placeholder="Mesajınızı buraya yazın...", show_label=False)
        state = gr.State([])
        
    inputs.submit(predict, [system_msg, inputs, chatbot, state], [chatbot, state])

demo.launch()