Kunal
commited on
Commit
·
5de36cd
1
Parent(s):
415f853
added Note in UI
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def chat_ui(message, history, pdf_text):
|
|
75 |
return history
|
76 |
|
77 |
with gr.Blocks() as demo:
|
78 |
-
gr.Markdown("# 📄 Chat with your PDF
|
79 |
with gr.Row():
|
80 |
with gr.Column(scale=1):
|
81 |
pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
|
@@ -83,7 +83,7 @@ with gr.Blocks() as demo:
|
|
83 |
with gr.Column(scale=3):
|
84 |
chatbot = gr.Chatbot(label="PDF Chat", height=400, type="messages")
|
85 |
msg = gr.Textbox(label="Ask a question about the PDF", placeholder="Type your question and hit Enter...")
|
86 |
-
|
87 |
pdf_input.upload(
|
88 |
fn=process_pdf_ui,
|
89 |
inputs=pdf_input,
|
|
|
75 |
return history
|
76 |
|
77 |
with gr.Blocks() as demo:
|
78 |
+
gr.Markdown("# 📄 Chat with your PDF")
|
79 |
with gr.Row():
|
80 |
with gr.Column(scale=1):
|
81 |
pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
|
|
|
83 |
with gr.Column(scale=3):
|
84 |
chatbot = gr.Chatbot(label="PDF Chat", height=400, type="messages")
|
85 |
msg = gr.Textbox(label="Ask a question about the PDF", placeholder="Type your question and hit Enter...")
|
86 |
+
gr.Markdown("**Note:** This app uses the Gemini AI model to process your PDF and answer questions. Make sure to upload a PDF first and add your Google API in secrets. You can get it from [Gemini AI Studio](https://aistudio.google.com/apikey).")
|
87 |
pdf_input.upload(
|
88 |
fn=process_pdf_ui,
|
89 |
inputs=pdf_input,
|