Update app.py
Browse files
app.py
CHANGED
@@ -119,34 +119,10 @@ def greet(name):
|
|
119 |
return f"Hello, {name}!"
|
120 |
|
121 |
# Create the Gradio interface
|
122 |
-
# with gr.Blocks(theme="Nymbo/Alyx_Theme") as demo:
|
123 |
-
# with gr.Tab("Indexing"):
|
124 |
-
# pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
|
125 |
-
# index_button = gr.Button("Index PDF")
|
126 |
-
# load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
|
127 |
-
# 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.")
|
128 |
-
# index_output = gr.Textbox(label="Indexing Status")
|
129 |
-
# index_button.click(index_pdf, inputs=pdf_input, outputs=index_output)
|
130 |
-
# load_sample.click(load_sample_pdf, inputs=None, outputs=index_output)
|
131 |
-
|
132 |
-
# with gr.Tab("Chatbot"):
|
133 |
-
# gr.ChatInterface(
|
134 |
-
# fn=generate_response,
|
135 |
-
# chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
|
136 |
-
# examples=examples_questions,
|
137 |
-
# additional_inputs=additional_inputs,
|
138 |
-
# cache_examples=False,
|
139 |
-
# )
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
with gr.Blocks(theme=gr.themes.Default()) as demo:
|
147 |
with gr.Tab("Indexig"):
|
148 |
-
|
149 |
-
pdf_input = gr.Textbox(label="PDF input")
|
150 |
index_button = gr.Button("Index PDF")
|
151 |
load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
|
152 |
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.")
|
|
|
119 |
return f"Hello, {name}!"
|
120 |
|
121 |
# Create the Gradio interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
with gr.Blocks(theme=gr.themes.Default()) as demo:
|
123 |
with gr.Tab("Indexig"):
|
124 |
+
pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
|
125 |
+
# pdf_input = gr.Textbox(label="PDF input")
|
126 |
index_button = gr.Button("Index PDF")
|
127 |
load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
|
128 |
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.")
|