Update app.py
Browse files
app.py
CHANGED
@@ -143,7 +143,7 @@ def greet(name):
|
|
143 |
|
144 |
|
145 |
|
146 |
-
with gr.Blocks(theme=
|
147 |
with gr.Tab("Testing"):
|
148 |
# Set the title and description for the app.
|
149 |
gr.Markdown("# Simple Gradio Greeter")
|
@@ -175,9 +175,9 @@ with gr.Blocks(theme="Nymbo/Alyx_Theme") as demo:
|
|
175 |
index_button = gr.Button("Index PDF")
|
176 |
load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
|
177 |
sample_description = gr.Markdown("This sample PDF is a seminal paper in the field of machine learning, titled 'Attention Is All You Need' at https://arxiv.org/abs/1706.03762. It introduces the Transformer model, which has become foundational in natural language processing.")
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
|
182 |
with gr.Tab("Chatbot"):
|
183 |
gr.ChatInterface(
|
|
|
143 |
|
144 |
|
145 |
|
146 |
+
with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|
147 |
with gr.Tab("Testing"):
|
148 |
# Set the title and description for the app.
|
149 |
gr.Markdown("# Simple Gradio Greeter")
|
|
|
175 |
index_button = gr.Button("Index PDF")
|
176 |
load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
|
177 |
sample_description = gr.Markdown("This sample PDF is a seminal paper in the field of machine learning, titled 'Attention Is All You Need' at https://arxiv.org/abs/1706.03762. It introduces the Transformer model, which has become foundational in natural language processing.")
|
178 |
+
index_output = gr.Textbox(label="Indexing Status")
|
179 |
+
index_button.click(index_pdf, inputs=pdf_input, outputs=index_output)
|
180 |
+
load_sample.click(load_sample_pdf, inputs=None, outputs=index_output)
|
181 |
|
182 |
with gr.Tab("Chatbot"):
|
183 |
gr.ChatInterface(
|