Spaces:
Sleeping
Sleeping
import gradio as gr | |
from rag_pipeline import load_rag_chain | |
rag_chain = load_rag_chain() | |
def ask_question(query): | |
return rag_chain.invoke(query)['result'] | |
iface = gr.Interface( | |
fn=ask_question, | |
inputs=gr.Textbox(lines=3, placeholder="اكتب سؤالك هنا...", label="سؤالك", rtl=True), | |
outputs=gr.Textbox(label="الإجابة", rtl=True), | |
title="🧠 روبوت دردشة عربي (PDF)", | |
description="اسأل باللغة العربية أو اللهجة المصرية عن محتوى ملفات PDF." | |
) | |
if __name__ == "__main__": | |
iface.launch() | |