pseudotensor commited on
Commit
dc4f764
1 Parent(s): 629c1c8

Update with h2oGPT hash c7453f1b1ab51fb1cd342a9867f23cd7b538e000

Browse files
Files changed (1) hide show
  1. src/gradio_runner.py +10 -6
src/gradio_runner.py CHANGED
@@ -737,7 +737,8 @@ def go_gradio(**kwargs):
737
  visible=True,
738
  elem_id="langchain_agents",
739
  filterable=False)
740
- visible_doc_track = upload_visible and kwargs['visible_doc_track'] and not kwargs['large_file_count_mode']
 
741
  row_doc_track = gr.Row(visible=visible_doc_track)
742
  with row_doc_track:
743
  if kwargs['langchain_mode'] in langchain_modes_non_db:
@@ -784,6 +785,9 @@ def go_gradio(**kwargs):
784
  text_output_nochat_api = gr.Textbox(lines=5, label='API nochat output', visible=False,
785
  show_copy_button=True)
786
 
 
 
 
787
  # CHAT
788
  col_chat = gr.Column(visible=kwargs['chat'])
789
  with col_chat:
@@ -806,7 +810,8 @@ def go_gradio(**kwargs):
806
  size="sm",
807
  min_width=24,
808
  file_types=['.' + x for x in file_types],
809
- file_count="multiple")
 
810
 
811
  submit_buttons = gr.Row(equal_height=False, visible=kwargs['visible_submit_buttons'])
812
  with submit_buttons:
@@ -886,11 +891,9 @@ def go_gradio(**kwargs):
886
  visible=sources_visible and allow_upload_to_user_data)
887
  with gr.Column(scale=4):
888
  pass
 
889
  with gr.Row():
890
  with gr.Column(scale=1):
891
- visible_add_remove_collection = (allow_upload_to_user_data or
892
- allow_upload_to_my_data) and \
893
- kwargs['langchain_mode'] != 'Disabled'
894
  add_placeholder = "e.g. UserData2, shared, user_path2" \
895
  if not is_public else "e.g. MyData2, personal (optional)"
896
  remove_placeholder = "e.g. UserData2" if not is_public else "e.g. MyData2"
@@ -1143,7 +1146,8 @@ def go_gradio(**kwargs):
1143
  )
1144
  min_max_new_tokens = gr.Slider(
1145
  minimum=1, maximum=max_max_new_tokens, step=1,
1146
- value=min(max_max_new_tokens, kwargs['min_max_new_tokens']), label="Min. of Max output length",
 
1147
  )
1148
  early_stopping = gr.Checkbox(label="EarlyStopping", info="Stop early in beam search",
1149
  value=kwargs['early_stopping'], visible=max_beams > 1)
 
737
  visible=True,
738
  elem_id="langchain_agents",
739
  filterable=False)
740
+ visible_doc_track = upload_visible and kwargs['visible_doc_track'] and not kwargs[
741
+ 'large_file_count_mode']
742
  row_doc_track = gr.Row(visible=visible_doc_track)
743
  with row_doc_track:
744
  if kwargs['langchain_mode'] in langchain_modes_non_db:
 
785
  text_output_nochat_api = gr.Textbox(lines=5, label='API nochat output', visible=False,
786
  show_copy_button=True)
787
 
788
+ visible_upload = (allow_upload_to_user_data or
789
+ allow_upload_to_my_data) and \
790
+ kwargs['langchain_mode'] != 'Disabled'
791
  # CHAT
792
  col_chat = gr.Column(visible=kwargs['chat'])
793
  with col_chat:
 
810
  size="sm",
811
  min_width=24,
812
  file_types=['.' + x for x in file_types],
813
+ file_count="multiple",
814
+ visible=visible_upload)
815
 
816
  submit_buttons = gr.Row(equal_height=False, visible=kwargs['visible_submit_buttons'])
817
  with submit_buttons:
 
891
  visible=sources_visible and allow_upload_to_user_data)
892
  with gr.Column(scale=4):
893
  pass
894
+ visible_add_remove_collection = visible_upload
895
  with gr.Row():
896
  with gr.Column(scale=1):
 
 
 
897
  add_placeholder = "e.g. UserData2, shared, user_path2" \
898
  if not is_public else "e.g. MyData2, personal (optional)"
899
  remove_placeholder = "e.g. UserData2" if not is_public else "e.g. MyData2"
 
1146
  )
1147
  min_max_new_tokens = gr.Slider(
1148
  minimum=1, maximum=max_max_new_tokens, step=1,
1149
+ value=min(max_max_new_tokens, kwargs['min_max_new_tokens']),
1150
+ label="Min. of Max output length",
1151
  )
1152
  early_stopping = gr.Checkbox(label="EarlyStopping", info="Stop early in beam search",
1153
  value=kwargs['early_stopping'], visible=max_beams > 1)