<commit_before>import React, { useState, FunctionComponent, ChangeEvent } from "react";

type Props = {
  initialVolume: number;
  onChangeVolume: (volume: number) => void;
};

const Component: FunctionComponent<Props> = props => {
  const [volume, setVolume] = useState(props.initialVolume);

  const onChange = (event: ChangeEvent<HTMLInputElement>) => {
    const volume = parseFloat(event.target.value);
    setVolume(volume);
    props.onChangeVolume(volume);
  };

  return (
    <form id="controls">
      Volume{" "}
      <input
        type="range"
        min="0"
        max="1"
        step="0.01"
        value={volume}
        onChange={onChange}
      />
    </form>
  );
};

export default Component;<commit_msg>Fix "Form elements do not have associated labels"<commit_after>import React, { useState, FunctionComponent, ChangeEvent } from "react";

type Props = {
  initialVolume: number;
  onChangeVolume: (volume: number) => void;
};

const Component: FunctionComponent<Props> = props => {
  const [volume, setVolume] = useState(props.initialVolume);

  const onChange = (event: ChangeEvent<HTMLInputElement>) => {
    const volume = parseFloat(event.target.value);
    setVolume(volume);
    props.onChangeVolume(volume);
  };

  return (
    <form id="controls">
      <label>
        Volume{" "}
        <input
          type="range"
          min="0"
          max="1"
          step="0.01"
          value={volume}
          onChange={onChange}
        />
      </label>
    </form>
  );
};

export default Component;
{'fraction_non_alphanumeric': 0.1382219338092148, 'fraction_numerical': 0.006489292667099286, 'mean_word_length': 2.884130982367758, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, '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': '7636484', 'n_tokens_mistral': 456, 'n_tokens_neox': 458, 'n_words': 102}