jchen8000 commited on
Commit
04937cf
·
verified ·
1 Parent(s): 755a112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -117,14 +117,14 @@ additional_inputs = [
117
  # Create the Gradio interface
118
  with gr.Blocks(theme="Nymbo/Alyx_Theme") as demo:
119
  with gr.Tab("Indexing"):
120
- pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
121
  # pdf_input = gr.Textbox(label="PDF File")
122
- index_button = gr.Button("Index PDF")
123
  # load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
124
  load_sample = gr.Button("Load and Index [Attention Is All You Need.pdf] as a Sample")
125
  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.")
126
  index_output = gr.Textbox(label="Indexing Status")
127
- index_button.click(index_pdf, inputs=pdf_input, outputs=index_output)
128
  load_sample.click(load_sample_pdf, inputs=None, outputs=index_output)
129
 
130
  with gr.Tab("Chatbot"):
 
117
  # Create the Gradio interface
118
  with gr.Blocks(theme="Nymbo/Alyx_Theme") as demo:
119
  with gr.Tab("Indexing"):
120
+ # pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
121
  # pdf_input = gr.Textbox(label="PDF File")
122
+ # index_button = gr.Button("Index PDF")
123
  # load_sample = gr.Button("Alternatively, Load and Index [Attention Is All You Need.pdf] as a Sample")
124
  load_sample = gr.Button("Load and Index [Attention Is All You Need.pdf] as a Sample")
125
  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.")
126
  index_output = gr.Textbox(label="Indexing Status")
127
+ # index_button.click(index_pdf, inputs=pdf_input, outputs=index_output)
128
  load_sample.click(load_sample_pdf, inputs=None, outputs=index_output)
129
 
130
  with gr.Tab("Chatbot"):