Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,16 +4,15 @@ from rag_pipeline import load_rag_chain
|
|
4 |
rag_chain = load_rag_chain()
|
5 |
|
6 |
def ask_question(query):
|
7 |
-
|
8 |
-
return result['result']
|
9 |
|
10 |
iface = gr.Interface(
|
11 |
fn=ask_question,
|
12 |
inputs=gr.Textbox(lines=3, placeholder="اكتب سؤالك هنا...", label="سؤالك", rtl=True),
|
13 |
outputs=gr.Textbox(label="الإجابة", rtl=True),
|
14 |
-
title="🧠 روبوت دردشة عربي
|
15 |
-
description="
|
16 |
)
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
-
iface.launch()
|
|
|
4 |
rag_chain = load_rag_chain()
|
5 |
|
6 |
def ask_question(query):
|
7 |
+
return rag_chain.invoke(query)['result']
|
|
|
8 |
|
9 |
iface = gr.Interface(
|
10 |
fn=ask_question,
|
11 |
inputs=gr.Textbox(lines=3, placeholder="اكتب سؤالك هنا...", label="سؤالك", rtl=True),
|
12 |
outputs=gr.Textbox(label="الإجابة", rtl=True),
|
13 |
+
title="🧠 روبوت دردشة عربي (PDF)",
|
14 |
+
description="اسأل باللغة العربية أو اللهجة المصرية عن محتوى ملفات PDF."
|
15 |
)
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
+
iface.launch()
|