ramysaidagieb commited on
Commit
8aab188
·
verified ·
1 Parent(s): 07f5718

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -1,16 +1,13 @@
1
  import gradio as gr
2
- from rag_pipeline import answer_question
3
-
4
- def qa_interface(question):
5
- return answer_question(question)
6
 
7
  iface = gr.Interface(
8
- fn=qa_interface,
9
- inputs=gr.Textbox(lines=3, placeholder="اكتب سؤالك هنا...", label="سؤالك", rtl=True),
10
  outputs=gr.Textbox(label="الإجابة", rtl=True),
11
- title="🤖 روبوت سؤال وجواب عربي باستخدام PDF",
12
- description="ارفع ملفات PDF باللغة العربية، واسأل عنها مباشرة (يدعم اللهجة المصرية ويعمل على CPU)."
13
  )
14
 
15
  if __name__ == "__main__":
16
- iface.launch()
 
1
  import gradio as gr
2
+ from rag_pipeline import answer
 
 
 
3
 
4
  iface = gr.Interface(
5
+ fn=answer,
6
+ inputs=gr.Textbox(lines=2, placeholder="اكتب سؤالك هنا...", label="سؤالك", rtl=True),
7
  outputs=gr.Textbox(label="الإجابة", rtl=True),
8
+ title="🤖 Arabic PDF QA Bot",
9
+ description="اسأل باللغة العربية عن محتوى ملفات PDF (يدعم اللهجة المصرية)."
10
  )
11
 
12
  if __name__ == "__main__":
13
+ iface.launch()