test_audio_clips / README.md
AneeqMalik's picture
Upload README.md with huggingface_hub
d313c39
metadata
dataset_info:
  features:
    - name: audio
      dtype: audio
    - name: audio_names
      dtype: string
    - name: class_label
      dtype:
        class_label:
          names:
            '0': bad
            '1': okay
            '2': good
            '3': great
  splits:
    - name: train
      num_bytes: 12388426
      num_examples: 6
  download_size: 12391305
  dataset_size: 12388426
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

Follow these steps to set up and upload your audio dataset to Hugging Face:

  • Create a Virtual Environment

    • Start by creating a virtual environment on your machine. Run the following commands:

      On Windows

      python -m venv env
      ./env/Scripts/activate 
      

      On macOS/Linux

      source env/bin/activate  
      pip install -r requirements.txt
      
  • Generate a Hugging Face Token

    • To interact with Hugging Face and push datasets, you'll need a Hugging Face access token. Follow these steps to generate one:
      • Go to Hugging Face Settings.
      • Click on "New Token."
      • Give the token a name and select the Role as "Write."
      • Copy the generated token.
  • Configure Your Token

    • Run the following command, replacing 'YOUR_TOKEN_HERE' with the token you obtained from Hugging Face:
      python -c "from huggingface_hub.hf_api import HfFolder; HfFolder.save_token('YOUR_TOKEN_HERE')"
      

    This command will configure your environment with your Hugging Face token.

  • Modify main.py

    • In the main.py file, make the following changes:
      • Replace 'Enter-Your-hub-name' with the name of your dataset. For example, use 'AneeqMalik/test_audio_clips'.
      audio_dataset.push_to_hub("Enter-Your-hub-name")
      

    This line specifies where your dataset will be pushed on Hugging Face.

  • Run the Code

    • To push your audio dataset to Hugging Face, execute the following command:
      python main.py
      

    Your audio dataset will be uploaded to Hugging Face under the specified name.