<commit_before>class @ImageUploader
  constructor: (@container) ->
    @fileInput = @container.find('input[type="file"]')
    @idInput = @container.find('[data-item="id"]')
    @container.find('a.btn.fileupload-exists').bind('ajax:success', @delete)
    @fileInput.fileupload
      dataType: 'json'
      formData: {name: @fileInput.attr('name'), value: @fileInput.val()}
      add: @add
      progress: @progress
      done: @done

  add: (e, data) =>
    @loader = $('<div class="progress progress-striped"><div class="bar" style="width: 0%;"></div></div>').hide()
    @container.append(@loader.fadeIn())
    data.submit()

  progress: (e, data) =><commit_msg>Changing the place where the loader appears<commit_after>class @ImageUploader
  constructor: (@container) ->
    @preview = @container.find('[data-provides="fileupload"]')
    @fileInput = @container.find('input[type="file"]')
    @idInput = @container.find('[data-item="id"]')
    @container.find('a.btn.fileupload-exists').bind('ajax:success', @delete)
    @fileInput.fileupload
      dataType: 'json'
      formData: {name: @fileInput.attr('name'), value: @fileInput.val()}
      add: @add
      progress: @progress
      done: @done

  add: (e, data) =>
    @loader = $('<div class="progress progress-striped active"><div class="bar" style="width: 0%;"></div></div>').hide()
    @preview.prepend(@loader.fadeIn())
    data.submit()

  progress: (e, data) =>
{'fraction_non_alphanumeric': 0.20238931834153198, 'fraction_numerical': 0.0014054813773717498, 'mean_word_length': 4.178181818181818, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '7311230', 'n_tokens_mistral': 466, 'n_tokens_neox': 459, 'n_words': 87}