semvec/pypi-packages huggingface dataset:
llama-cpp-python-gradio 0.0.1
A Python package for creating Gradio applications with llama.cpp models
Requires Python: >=3.10

# `llama-cpp-python-gradio`

is a Python package that makes it easy for developers to create machine learning apps powered by llama.cpp models using Gradio.

# Installation

You can install `llama-cpp-python-gradio` directly using pip:

```bash
pip install llama-cpp-python-gradio
```

# Basic Usage

First, you'll need a GGUF model file for llama.cpp. Then in a Python file, write:

```python
import gradio as gr
import llama_cpp_python_gradio

gr.load(
    model_path='path/to/your/model.gguf',
    src=llama_cpp_python_gradio.registry,
).launch()
```

Run the Python file, and you should see a Gradio Interface connected to your local llama.cpp model!

# Customization 

You can customize the interface by passing additional arguments to the Llama constructor:

```python
import gradio as gr
import llama_cpp_python_gradio

gr.load(
    model_path='path/to/your/model.gguf',
    src=llama_cpp_python_gradio.registry,
    n_ctx=2048,  # context window size
    n_gpu_layers=1  # number of layers to offload to GPU
).launch()
```

# Under the Hood

The `llama-cpp-python-gradio` library has two main dependencies: `llama-cpp-python` and `gradio`. It provides a "registry" function that creates a Gradio ChatInterface connected to your local llama.cpp model.

The interface supports both text and image inputs (for multimodal models), with automatic handling of file uploads and base64 encoding.

-------

Note: Make sure you have a compatible GGUF model file before running the interface. You can download models from sources like Hugging Face or convert existing models to GGUF format.
shpkg 0.2.0
packaging made fun and easy
Requires Python: >=3.12

## what is shpkg?
it is a cross-distro package manager that uses shell scripts to install packages. you see, packages are complicated, and most people don't make package their software anyways. then we said,
> what if we made packaging fun and easy so it's more accessible and developer-friendly?

and that started shpkg/shpm's journey.

24.11.2024 (us 11.24.2024) - shpkg/shpm was created

## how does it work?
shpkg first searches for the desired package name ending with .sh in the `https://github.com/shpkg/repo` git repository. if it finds a match, it curl-bashes (to be exact, requests.get()) the script. else, it fails.
## how do i install it?
```bash
pip install shpkg
```
## how do i uninstall it?
```bash
pip uninstall shpkg
```
## how do i use it?
### install a package
```bash
shpkg i <package-name>
```
### uninstall a package
```bash
shpkg x <package-name>
```
### update a package
```bash
shpkg u <package-name>
```
### list installed packages
```bash
shpkg l
```
### update shpkg
```bash
pip install shpkg --upgrade
```
### update all packages
```bash
shpkg ua
```
### help
```bash
shpkg --help
```
### version
```bash
shpkg --version
```
## how do i make a package?
see https://github.com/shpkg/repo/blob/main/README.md
pydantic-swift-code 0.2.0
pydantic SWIFT/BIC code type
Requires Python: <4.0,>=3.9

## Overview
Micro-package that defines a SWIFT code type using the Pydantic package

## Installation
Install from PyPI
```commandline
pip install pydantic-swift-code
```
Install from GitHub
```commandline
pip install git@github.com:duketemon/pydantic-swift-code.git
```

## Usage
```python
from typing import Optional
from pydantic import BaseModel, field_validator
from pydantic_swift_code import SwiftCode

class BankAccount(BaseModel):
    swift_code: SwiftCode

    @field_validator("swift_code", mode="before")
    @classmethod
    def validate_swift_code_before_init(cls, swift_code: Optional[str]) -> str:
        """Make input case-insensitive"""
        if swift_code is None:
            raise ValueError("Received None value, expected string")

        return swift_code.upper()

    @field_validator("swift_code", mode="after")
    @classmethod
    def validate_swift_code_after_init(cls, swift_code: str) -> str:
        """Custom validation"""
        
        if swift_code[:4] not in {"REVO", "MONZ"}:
            raise ValueError("Only Revolut and Monzo swift codes are allowed")
        
        if swift_code[4:6] not in {"US", "GB"}:
            raise ValueError("Only GB and US swift codes are allowed")
        
        return swift_code
```