<commit_before>= form_for [:admin, @upload], multipart: true do |f|

  .form-group{ :class => ('gov-uk-field-error' if f.object.errors.include?(:group_id)) }
    = f.label :group_id, class: 'form-label-bold' do
      = t(:group_id, scope: 'helpers.person_uploads')
      - if f.object.errors.include?(:group_id)
        %span.error= f.object.errors[:group_id].first
    %p.form-hint
      = info_text('hint_person_upload_group')
    = f.collection_select :group_id,
      Group.all.sort_by { |g| g.path.map(&:to_s) },
      :id, :name_with_path, {}, class: 'form-control select-autocomplete team-select'
    %p
      = link_to t('person_uploads.add_new_team'), new_group_path

  = render partial: 'errors'

  .form-group{ :class => ('gov-uk-field-error' if f.object.errors.include?(:file)) }
    = f.label :file, class: 'form-label-bold' do
      = t(:file, scope: 'helpers.person_uploads')
      - if f.object.errors.include?(:file)
        %span.error= f.object.errors[:file].first
    %p.form-hint
      =info_text('hint_person_upload_file_html')<commit_msg>Use efficient group list in CSV upload form<commit_after>= form_for [:admin, @upload], multipart: true do |f|

  .form-group{ :class => ('gov-uk-field-error' if f.object.errors.include?(:group_id)) }
    = f.label :group_id, class: 'form-label-bold' do
      = t(:group_id, scope: 'helpers.person_uploads')
      - if f.object.errors.include?(:group_id)
        %span.error= f.object.errors[:group_id].first
    %p.form-hint
      = info_text('hint_person_upload_group')
    = f.collection_select :group_id,
      GroupLister.new.list.sort_by { |g| g.path.map(&:to_s) },
      :id, :name_with_path, {}, class: 'form-control select-autocomplete team-select'
    %p
      = link_to t('person_uploads.add_new_team'), new_group_path

  = render partial: 'errors'

  .form-group{ :class => ('gov-uk-field-error' if f.object.errors.include?(:file)) }
    = f.label :file, class: 'form-label-bold' do
      = t(:file, scope: 'helpers.person_uploads')
      - if f.object.errors.include?(:file)
        %span.error= f.object.errors[:file].first
    %p.form-hint
      =info_text('hint_person_upload_file_html')
{'fraction_non_alphanumeric': 0.16967175219602404, 'fraction_numerical': 0.0, 'mean_word_length': 3.498960498960499, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4883556', 'n_tokens_mistral': 789, 'n_tokens_neox': 777, 'n_words': 134}