Omarrran commited on
Commit
21bef18
·
verified ·
1 Parent(s): 9c5846d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -302,26 +302,26 @@ with gr.Blocks(css=css, theme=gr.themes.Monochrome()) as demo:
302
 
303
  with gr.Row():
304
  status = gr.Textbox(label="Status", placeholder="", interactive=False)
305
- load_pdf = gr.Button("Upload PDF and generate embeddings").style(full_width=False)
306
-
307
  with gr.Row():
308
  summary = gr.Textbox(label="Summary")
309
- summarize_pdf = gr.Button("Have Moli Summarize the Contents").style(full_width=False)
310
-
311
  with gr.Row():
312
  input = gr.Textbox(label="Type in your question")
313
  output = gr.Textbox(label="Answer")
314
- submit_query = gr.Button("Submit your own question to AskMoli").style(full_width=False)
315
-
316
  with gr.Row():
317
  questionsets = gr.Dropdown(label="Pre-defined Question Sets stored in the DB", choices=[])
318
- load_questionsets = gr.Button("Retrieve Pre-defined Question Sets from DB").style(full_width=False)
319
  fields_and_questions = gr.Dataframe(label="Fields and Questions in the chosen Question Set")
320
- load_fields_and_questions = gr.Button("Retrieve Pre-defined Questions from the DB for the chosen QuestionSet").style(full_width=False)
321
 
322
  with gr.Row():
323
  answers = gr.Dataframe(label="Answers to Predefined Question set")
324
- answers_for_predefined_question_set = gr.Button("Get answers to the chosen pre-defined question set").style(full_width=False)
325
 
326
  with gr.Tab("OCR Converter"):
327
  with gr.Column():
@@ -329,7 +329,7 @@ with gr.Blocks(css=css, theme=gr.themes.Monochrome()) as demo:
329
 
330
  with gr.Row():
331
  ocr_pdf = gr.File(label="OCR'd pdf", file_types=['.pdf'], type='filepath', file_count="single")
332
- convert_into_ocr = gr.Button("Convert").style(full_width=False)
333
 
334
  with gr.Tab("Upload Question Set"):
335
  with gr.Column():
@@ -595,7 +595,7 @@ with gr.Blocks(css=css, theme=gr.themes.Monochrome()) as demo:
595
 
596
  with gr.Row():
597
  status_for_loading_csv = gr.Textbox(label="Status", placeholder="", interactive=False)
598
- load_csv = gr.Button("Upload data into the database").style(full_width=False)
599
 
600
  load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc, open_ai_key, relevant_pages], outputs=status)
601
  summarize_pdf.click(summarize_contents, outputs=summary)
 
302
 
303
  with gr.Row():
304
  status = gr.Textbox(label="Status", placeholder="", interactive=False)
305
+ load_pdf = gr.Button("Upload PDF and generate embeddings")
306
+
307
  with gr.Row():
308
  summary = gr.Textbox(label="Summary")
309
+ summarize_pdf = gr.Button("Have Moli Summarize the Contents")
310
+
311
  with gr.Row():
312
  input = gr.Textbox(label="Type in your question")
313
  output = gr.Textbox(label="Answer")
314
+ submit_query = gr.Button("Submit your own question to AskMoli")
315
+
316
  with gr.Row():
317
  questionsets = gr.Dropdown(label="Pre-defined Question Sets stored in the DB", choices=[])
318
+ load_questionsets = gr.Button("Retrieve Pre-defined Question Sets from DB")
319
  fields_and_questions = gr.Dataframe(label="Fields and Questions in the chosen Question Set")
320
+ load_fields_and_questions = gr.Button("Retrieve Pre-defined Questions from the DB for the chosen QuestionSet")
321
 
322
  with gr.Row():
323
  answers = gr.Dataframe(label="Answers to Predefined Question set")
324
+ answers_for_predefined_question_set = gr.Button("Get answers to the chosen pre-defined question set")
325
 
326
  with gr.Tab("OCR Converter"):
327
  with gr.Column():
 
329
 
330
  with gr.Row():
331
  ocr_pdf = gr.File(label="OCR'd pdf", file_types=['.pdf'], type='filepath', file_count="single")
332
+ convert_into_ocr = gr.Button("Convert")
333
 
334
  with gr.Tab("Upload Question Set"):
335
  with gr.Column():
 
595
 
596
  with gr.Row():
597
  status_for_loading_csv = gr.Textbox(label="Status", placeholder="", interactive=False)
598
+ load_csv = gr.Button("Upload data into the database")
599
 
600
  load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc, open_ai_key, relevant_pages], outputs=status)
601
  summarize_pdf.click(summarize_contents, outputs=summary)