File size: 431 Bytes
bd9a51c
8987ddb
bd9a51c
8987ddb
 
 
 
bd9a51c
 
8987ddb
 
 
 
bd9a51c
8987ddb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from agent import query_agent

def chat_interface(user_input, history):
    response = query_agent(user_input)
    history.append((user_input, response))
    return "", history

with gr.Blocks() as demo:
    gr.Markdown("# 🤖 NINU Agent Chatbot")
    chatbot = gr.Chatbot()
    msg = gr.Textbox(label="اكتب سؤالك هنا")
    msg.submit(chat_interface, [msg, chatbot], [msg, chatbot])

demo.launch()