ramysaidagieb commited on
Commit
06145ef
·
verified ·
1 Parent(s): 2d59ec1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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
- result = rag_chain.invoke(query)
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="🧠 روبوت دردشة عربي باستخدام ملفات PDF",
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()