lekkalar commited on
Commit
c76b601
1 Parent(s): e7cbe60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -85,6 +85,9 @@ def answer_predefined_questions(document_type):
85
  queryList = [queryA0, queryA1]
86
  fieldList = [fieldA0, fieldA1]
87
 
 
 
 
88
 
89
  response=""
90
  i = 0
@@ -142,7 +145,7 @@ with gr.Blocks(css=css,theme=gr.themes.Monochrome()) as demo:
142
  with gr.Row():
143
  input = gr.Textbox(label="Type in your question")
144
  output = gr.Textbox(label="Answer")
145
- submit_query = gr.Button("Submit your question")
146
 
147
 
148
  load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc, openai_key], outputs=status)
 
85
  queryList = [queryA0, queryA1]
86
  fieldList = [fieldA0, fieldA1]
87
 
88
+ else:
89
+ return "Please choose your Document Type"
90
+
91
 
92
  response=""
93
  i = 0
 
145
  with gr.Row():
146
  input = gr.Textbox(label="Type in your question")
147
  output = gr.Textbox(label="Answer")
148
+ submit_query = gr.Button("Submit your own question")
149
 
150
 
151
  load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc, openai_key], outputs=status)