Skip to main content

Generate synthetic datasets from natural language using Gemini 1.5 Flash

Project description

🧬 Gemini Dataset Generator

Generate synthetic datasets from natural language descriptions using Google's Gemini 1.5 Flash model. Ideal for data science, machine learning prototyping, and testing workflows with customizable, structured synthetic data.


✨ Features

  • ⚡ Powered by Gemini 1.5 Flash (fast + cost-effective)
  • 🧠 Natural language prompt → structured data
  • 📦 Output in pandas, CSV, and JSON
  • 🧪 Optional edge case injection for testing
  • 🧾 Save datasets to local disk
  • 🔐 Easy API key setup using .env

📦 Installation

Install from PyPI:

pip install gemini-dataset-generator


Or clone manually:


git clone https://github.com/ahsanraza1457/deepfaker_ai.git
cd deepfaker_ai
pip install -r requirements.txt

🔐 Setup
Create a .env file in the root directory of your project
GEMINI_API_KEY=your_google_generativeai_api_key


🚀 Usage
from generator import generate_dataset

df = generate_dataset(
    description="Customer name, email, age, and signup date",
    num_samples=50
)

print(df.head())



Save Output as CSV or JSON
generate_dataset(
    description="IoT device logs with timestamp, device_id, temperature",
    num_samples=100,
    save_as='csv'  # Options: 'csv', 'json', 'both'
)



🗂 Project Structure
├── generator/
│   ├── __init__.py
│   ├── generator.py           # Main interface   ├── formatter.py           # Formats model output   ├── prompts.py             # Builds prompt from description   ├── edge_case_handler.py   # Injects edge cases
│
├── .env                      
├── README.md
├── requirements.txt
└── setup.py / pyproject.toml  

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datafaker_ai-0.1.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datafaker_ai-0.1.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file datafaker_ai-0.1.4.tar.gz.

File metadata

  • Download URL: datafaker_ai-0.1.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for datafaker_ai-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f268fc2844f911362906127879a10bee6a25dbd1dc07e1cd8e7ca38af16389a8
MD5 10faf4a1e39c266b4cf86d77a59de495
BLAKE2b-256 f9b18b7fb9094fb72216ca32ba879d5454185f81cbcbe6e49e30205d7752fb46

See more details on using hashes here.

File details

Details for the file datafaker_ai-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: datafaker_ai-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for datafaker_ai-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c94df06ac67343c7a0b4dea1e9fc74d81e66b753915c33d0020e8d8cfe2e0283
MD5 f3d6abce56edc434d2562bb7ae1bf3ee
BLAKE2b-256 b0b8ecbeb534e37172751663677c6729036bae9c6a619f2ab19ed4c078c435c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page