File size: 633 Bytes
b303183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
from agent.agent import RealEstateAgent

agent = RealEstateAgent()

def chat(user_input):
    response = agent.respond(user_input)
    return response

iface = gr.Interface(
    fn=chat,
    inputs=gr.Textbox(lines=2, placeholder="اكتب سؤالك عن العقارات هنا..."),
    outputs="text",
    title="مساعد العقارات الذكي",
    description="اسأل مساعد الذكاء الاصطناعي عن العقارات المتاحة، العروض، والأسعار بلهجتك العربية المفضلة.",
    theme="default"
)

if __name__ == "__main__":
    iface.launch()