RAG74 / app.py
ramysaidagieb's picture
Upload 3 files
77f3883 verified
raw
history blame
429 Bytes
import gradio as gr
from rag_pipeline import load_rag_chain
rag_chain = load_rag_chain()
def ask_question(query):
result = rag_chain.invoke(query)
return result['result']
iface = gr.Interface(fn=ask_question,
inputs=gr.Textbox(lines=3, label="Ask a Question"),
outputs="text",
title="Custom PDF RAG Chatbot")
if __name__ == "__main__":
iface.launch()