Skip to content

A comprehensive Python toolkit for AI, data processing, media manipulation, and system utilities.

License

Notifications You must be signed in to change notification settings

YaronKoresh/definers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Definers: Your All-in-One Python Toolkit

CI Tests codecov License: MIT

Definers is a powerful and versatile Python library designed to streamline a wide range of tasks, from machine learning and AI-powered media generation to everyday file and system operations. Whether you're a data scientist, a developer, or an AI enthusiast, Definers provides the tools you need to get the job done efficiently.

Features

  • AI Media Generation: Create images, videos, music, and summaries using state-of-the-art models.
  • Machine Learning: Train and predict with hybrid models, perform linear regression, and get K-means suggestions.
  • Data Processing: Effortlessly extract features from audio, video, images, and text.
  • File & System Utilities: A robust set of tools for file manipulation, command execution, and environment management.
  • Web Scraping & Translation: Extract text from web pages and translate it with ease.
  • GPU Acceleration: Built-in support for CUDA via CuPy and RAPIDS for high-performance computing.

Installation without CUDA Support

You can install the core components of Definers directly from its GitHub repository:

pip install git+https://github.com/YaronKoresh/definers.git

Installation with CUDA Support

If you don't have CUDA installed, and you are using linux with bash, you can install CUDA Toolkit, by using the following format:

wget https://raw.githubusercontent.com/YaronKoresh/definers/refs/heads/main/scripts/setup_cuda.sh
chmod +x setup_cuda.sh
./setup_cuda.sh

Now, after you have CUDA installed, you can install definers with CUDA acceleration:

pip install "definers[cuda] @ git+https://github.com/YaronKoresh/definers.git" --extra-index-url https://pypi.nvidia.com

Quick Start

Here’s a quick example of how to use Definers to summarize a piece of text:

from definers import summary, init_pretrained_model

init_pretrained_model("summary",turbo=True)

long_text = """
The burgeoning field of artificial intelligence is rapidly transforming industries worldwide.
From healthcare to finance, AI algorithms are optimizing processes, uncovering insights from vast datasets,
and enabling innovations that were previously unimaginable. As the technology matures, it promises to
tackle even more complex challenges, heralding a new era of technological advancement.
"""
short_summary = summary(long_text, max_words=20)

print("Original Text Length:", len(long_text.split()))
print("Summary Text Length:", len(short_summary.split()))
print("\nSummary:")
print(short_summary)

Contributing

Contributions are welcome! If you have a feature request, bug report, or want to contribute to the code, please feel free to open an issue or submit a pull request on our GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.