Team Ai
Apppublic

rohitnain/AI_Powered_Test_Data_Generator

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
App README

AI-Powered Test Data Generator

Generate realistic test data for testing, development, and prototyping using open-source LLMs via HuggingFace Inference API.

Features

  • —Generate structured data (users, products, orders, employees, transactions, reviews)
  • —Custom schema support with JSON definitions
  • —Multiple export formats (CSV, JSON)
  • —Uses HuggingFace Inference API with open-source models
  • —Batch generation (up to 100 records)
  • —Multiple locale support
  • —Deployable on HuggingFace Spaces

Available Models

  • —meta-llama/Meta-Llama-3.1-8B-Instruct
  • —Qwen/Qwen2.5-72B-Instruct
  • —google/gemma-2-9b-it

Setup

Local Installation

  1. 1.Clone the repository:
bash
git clone https://github.com/yourusername/test-data-generator.git
cd test-data-generator
  1. 1.Install dependencies:
bash
pip install -r requirements.txt
  1. 1.Set your HuggingFace token:
bash
export HF_TOKEN=your_token_here
  1. 1.Run the app:
bash
python app.py

HuggingFace Spaces Deployment

  1. 1.Create a new Space at huggingface.co/spaces
  2. 2.Select "Gradio" as the SDK
  3. 3.Upload app.py and requirements.txt
  4. 4.Add HF_TOKEN as a Space secret (Settings > Repository secrets)

Usage

Template Generator

  1. 1.Select an LLM model from the dropdown
  2. 2.Choose a data type template (Users, Products, Orders, etc.)
  3. 3.Customize fields if needed
  4. 4.Set the number of records to generate
  5. 5.Add custom instructions (optional)
  6. 6.Click "Generate Data"
  7. 7.Download as CSV or JSON

Custom Schema

Define your own schema as a JSON object where:

  • —Each key is a field name
  • —Each value describes what data to generate

Example:

json
{
    "id": "unique integer identifier",
    "company_name": "realistic company name",
    "industry": "industry sector",
    "revenue": "annual revenue in millions USD",
    "employees": "number of employees",
    "founded_year": "year company was founded"
}

Environment Variables

VariableDescriptionRequired
HF_TOKENHuggingFace API tokenRecommended

Get your free token at: https://huggingface.co/settings/tokens

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.