clementsan commited on
Commit
a25f0eb
1 Parent(s): 4f52c44

Update gradio label descriptions

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -191,32 +191,32 @@ def demo():
191
  """)
192
  with gr.Tab("Step 1 - Document pre-processing"):
193
  with gr.Row():
194
- document = gr.Files(height=100, file_count="multiple", file_types=["pdf"], interactive=True, label="Upload PDF Documents")
195
  # upload_btn = gr.UploadButton("Loading document...", height=100, file_count="multiple", file_types=["pdf"], scale=1)
196
  with gr.Row():
197
- db_btn = gr.Radio(["ChromaDB"], label="Vector database", value = "ChromaDB", type="index", info="Choose your vector database")
198
- with gr.Accordion("Advanced options - Text splitter", open=False):
199
  with gr.Row():
200
  slider_chunk_size = gr.Slider(minimum = 100, maximum = 1000, value=500, step=20, label="Chunk size", info="Chunk size", interactive=True)
201
  with gr.Row():
202
  slider_chunk_overlap = gr.Slider(minimum = 10, maximum = 200, value=40, step=10, label="Chunk overlap", info="Chunk overlap", interactive=True)
203
  with gr.Row():
204
- db_progress = gr.Textbox(label="Database Initialization", value="None")
205
  with gr.Row():
206
  db_btn = gr.Button("Generating vector database...")
207
 
208
  with gr.Tab("Step 2 - Initializing QA chain"):
209
  with gr.Row():
210
  llm_btn = gr.Radio(list_llm_simple, \
211
- label="LLM", value = list_llm_simple[0], type="index", info="Choose your LLM model")
212
- with gr.Accordion("Advanced options - LLM", open=False):
213
  slider_temperature = gr.Slider(minimum = 0.0, maximum = 1.0, value=0.7, step=0.1, label="Temperature", info="Model temperature", interactive=True)
214
  slider_maxtokens = gr.Slider(minimum = 224, maximum = 4096, value=1024, step=32, label="Max Tokens", info="Model max tokens", interactive=True)
215
  slider_topk = gr.Slider(minimum = 1, maximum = 10, value=3, step=1, label="top-k samples", info="Model top-k samples", interactive=True)
216
  with gr.Row():
217
  llm_progress = gr.Textbox(value="None",label="QA chain Initialization")
218
  with gr.Row():
219
- qachain_btn = gr.Button("QA chain Initialization...")
220
 
221
  with gr.Tab("Step 3 - Conversation"):
222
  chatbot = gr.Chatbot(height=300)
 
191
  """)
192
  with gr.Tab("Step 1 - Document pre-processing"):
193
  with gr.Row():
194
+ document = gr.Files(height=100, file_count="multiple", file_types=["pdf"], interactive=True, label="Upload your PDF documents (single or multiple)")
195
  # upload_btn = gr.UploadButton("Loading document...", height=100, file_count="multiple", file_types=["pdf"], scale=1)
196
  with gr.Row():
197
+ db_btn = gr.Radio(["ChromaDB"], label="Vector database type", value = "ChromaDB", type="index", info="Choose your vector database")
198
+ with gr.Accordion("Advanced options - Document text splitter", open=False):
199
  with gr.Row():
200
  slider_chunk_size = gr.Slider(minimum = 100, maximum = 1000, value=500, step=20, label="Chunk size", info="Chunk size", interactive=True)
201
  with gr.Row():
202
  slider_chunk_overlap = gr.Slider(minimum = 10, maximum = 200, value=40, step=10, label="Chunk overlap", info="Chunk overlap", interactive=True)
203
  with gr.Row():
204
+ db_progress = gr.Textbox(label="Vector database initialization", value="None")
205
  with gr.Row():
206
  db_btn = gr.Button("Generating vector database...")
207
 
208
  with gr.Tab("Step 2 - Initializing QA chain"):
209
  with gr.Row():
210
  llm_btn = gr.Radio(list_llm_simple, \
211
+ label="LLM models", value = list_llm_simple[0], type="index", info="Choose your LLM model")
212
+ with gr.Accordion("Advanced options - LLM model", open=False):
213
  slider_temperature = gr.Slider(minimum = 0.0, maximum = 1.0, value=0.7, step=0.1, label="Temperature", info="Model temperature", interactive=True)
214
  slider_maxtokens = gr.Slider(minimum = 224, maximum = 4096, value=1024, step=32, label="Max Tokens", info="Model max tokens", interactive=True)
215
  slider_topk = gr.Slider(minimum = 1, maximum = 10, value=3, step=1, label="top-k samples", info="Model top-k samples", interactive=True)
216
  with gr.Row():
217
  llm_progress = gr.Textbox(value="None",label="QA chain Initialization")
218
  with gr.Row():
219
+ qachain_btn = gr.Button("Question-Answering chain Initialization...")
220
 
221
  with gr.Tab("Step 3 - Conversation"):
222
  chatbot = gr.Chatbot(height=300)