ramysaidagieb commited on
Commit
c78cfc1
·
verified ·
1 Parent(s): 43c33a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  from rag_pipeline import load_rag_chain
3
 
4
- # Load the RAG chain once
5
  rag_chain = load_rag_chain()
6
 
7
- # Gradio interface
8
  def ask_question(query):
9
  result = rag_chain.invoke(query)
10
  return result['result']
@@ -13,8 +13,8 @@ iface = gr.Interface(
13
  fn=ask_question,
14
  inputs=gr.Textbox(lines=3, placeholder="Ask something from your PDF...", label="Your Question"),
15
  outputs="text",
16
- title="🧠 Custom PDF Chatbot (Hugging Face)",
17
- description="Ask questions from your own uploaded PDF data."
18
  )
19
 
20
  if __name__ == "__main__":
 
1
  import gradio as gr
2
  from rag_pipeline import load_rag_chain
3
 
4
+ # Load the RAG system
5
  rag_chain = load_rag_chain()
6
 
7
+ # Interface logic
8
  def ask_question(query):
9
  result = rag_chain.invoke(query)
10
  return result['result']
 
13
  fn=ask_question,
14
  inputs=gr.Textbox(lines=3, placeholder="Ask something from your PDF...", label="Your Question"),
15
  outputs="text",
16
+ title="🧠 Custom PDF Chatbot (Flan-T5)",
17
+ description="Ask questions based on your uploaded PDF documents. This app runs entirely using free models."
18
  )
19
 
20
  if __name__ == "__main__":