Quent1Fvr commited on
Commit
5815892
1 Parent(s): cafec94

Update src/view/view.py

Browse files
Files changed (1) hide show
  1. src/view/view.py +5 -6
src/view/view.py CHANGED
@@ -11,12 +11,11 @@ def run(ctrl: Chatbot, config: {}):
11
 
12
  with gr.Column(scale=10):
13
  gr.Markdown(config['title'])
14
- intro_text = gr.Markdown(" <center> This app allows you to upload documents in HTML, PDF, or Word formats and ask questions about them. You can either use your own document or try with the provided example from Le Petit Prince.", visible=True)
15
 
16
- page_start_warning = gr.Markdown("<center>⚠️ If your document starts with a front cover and/or a table of contents, please enter the ⚠️ page number of the first page with real content.<center/>")
17
  actual_page_start = gr.Number(
18
  label="Start page (default = 1)",
19
- visible=True,
20
  interactive=True,
21
  container=True,
22
  value=1,
@@ -102,7 +101,7 @@ def run(ctrl: Chatbot, config: {}):
102
  clear_btn: gr.update(visible=False),
103
  include_images_btn: gr.update(visible=True,value=include_images_),
104
  page_start_warning: gr.update(visible=True),
105
- actual_page_start: gr.update(visible=True, value=1),
106
  intro_text: gr.update(visible=False),
107
 
108
  }
@@ -118,7 +117,7 @@ def run(ctrl: Chatbot, config: {}):
118
  upload_another_doc_btn: gr.update(visible=False),
119
  delete_database_btn: gr.update(visible=False),
120
  page_start_warning: gr.update(visible=True),
121
- actual_page_start: gr.update(visible=True, value=1),
122
  collections_list: gr.update(value=None, choices=[a.name for a in ctrl.client_db.list_collections()]),
123
  intro_text: gr.update(visible=False),
124
 
@@ -220,7 +219,7 @@ def run(ctrl: Chatbot, config: {}):
220
  include_images_btn: gr.update(visible=True),
221
  histo_text_comp: gr.update(visible=False, value=''),
222
  upload_another_doc_btn: gr.update(visible=False),
223
- actual_page_start: gr.update(visible=True, value=1),
224
  page_start_warning: gr.update(visible=True),
225
  intro_text: gr.update(visible=False),
226
  }
 
11
 
12
  with gr.Column(scale=10):
13
  gr.Markdown(config['title'])
14
+ intro_text = gr.Markdown("<center> Ask questions on any PDF, Word or HTML document. Start with "Le Petit Prince" or upload your own document.", visible=True)
15
 
 
16
  actual_page_start = gr.Number(
17
  label="Start page (default = 1)",
18
+ visible=False,
19
  interactive=True,
20
  container=True,
21
  value=1,
 
101
  clear_btn: gr.update(visible=False),
102
  include_images_btn: gr.update(visible=True,value=include_images_),
103
  page_start_warning: gr.update(visible=True),
104
+ actual_page_start: gr.update(visible=False, value=1),
105
  intro_text: gr.update(visible=False),
106
 
107
  }
 
117
  upload_another_doc_btn: gr.update(visible=False),
118
  delete_database_btn: gr.update(visible=False),
119
  page_start_warning: gr.update(visible=True),
120
+ actual_page_start: gr.update(visible=False, value=1),
121
  collections_list: gr.update(value=None, choices=[a.name for a in ctrl.client_db.list_collections()]),
122
  intro_text: gr.update(visible=False),
123
 
 
219
  include_images_btn: gr.update(visible=True),
220
  histo_text_comp: gr.update(visible=False, value=''),
221
  upload_another_doc_btn: gr.update(visible=False),
222
+ actual_page_start: gr.update(visible=False, value=1),
223
  page_start_warning: gr.update(visible=True),
224
  intro_text: gr.update(visible=False),
225
  }