Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
5 |
rag_chain = load_rag_chain()
|
6 |
|
7 |
-
#
|
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 (
|
17 |
-
description="Ask questions
|
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__":
|