semvec/pypi-packages huggingface dataset:
nlp-models 4.2.2
Transformers based NLP models
Requires Python: >=3.6

![PyPI - Package Version](https://img.shields.io/pypi/v/nlp-models?logo=pypi&style=flat&color=blue)
<a href="https://github.com/minggnim/nlp-models/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue" alt="MIT License"></a>
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/nlp-models.svg)](https://pypi.python.org/pypi/nlp-models/)
[![Python package](https://github.com/minggnim/nlp-classification-model/actions/workflows/python-package.yml/badge.svg)](https://github.com/minggnim/nlp-classification-model/actions/workflows/python-package.yml)
[![Dependency Review](https://github.com/minggnim/nlp-classification-model/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/minggnim/nlp-classification-model/actions/workflows/dependency-review.yml)

# NLP Models

A repository for building transformer based nlp models

## Installation

### Install from PyPi

```
pip install nlp-models
```

### Install from source

```
git clone git@github.com:minggnim/nlp-models.git
pip install -r requirements
```

## Llama2 Quantization model on consumer CPU

### Run Chat applications on CPU
1. Streamlit UI

    ```
    cd apps
    streamlit run chat.py
    ```

2. Command line

    ```
    llm_app chat -s 'hi there'
    ```

### Run Q&A application on CPU
1. Steamlit UI

    ```
    cd apps
    streamlit run qa.py
    ```

## Models

1. `bert_classifier`
   A wrapper package around BERT-based classification models

   - [Training example](https://github.com/minggnim/nlp-models/blob/master/notebooks/01_bert-classification-finetuning/01_a_classification_model_training_example.ipynb)
   - [Inference example](https://github.com/minggnim/nlp-models/blob/master/notebooks/01_bert-classification-finetuning/01_b_classification_inference_example.ipynb)
2. `multi_task_model`
   An implementation of multi-tasking model built on encoder models

   - [Zero-shot multi-task model](https://github.com/minggnim/nlp-models/blob/master/notebooks/02_multi-task-model/02_a_multitask_model_zeroshot_learning.ipynb)
   - [Training example](https://github.com/minggnim/nlp-models/blob/master/notebooks/02_multi-task-model/02_b_multitask_model_training_example.ipynb)
   - [Inference example](https://github.com/minggnim/nlp-models/blob/master/notebooks/02_multi-task-model/02_c_multitask_model_inference_example.ipynb)
   - [Qqrant Vector DB](https://github.com/minggnim/nlp-models/blob/master/notebooks/02_multi-task-model/02_d_qdrant_vector_db.ipynb)
3. `GPT-2`

    - [Training GPT-2 model](https://github.com/minggnim/nlp-models/blob/master/notebooks/03_gpt-2-training/gpt-2-training/03_gpt2_training.ipynb)

4. `Falcon 7B`

    - [Running Falcon 7b model](https://github.com/minggnim/nlp-models/blob/master/notebooks/04_llms/05_falcon_7b.ipynb)

5. Quantized Llama2 models

    - [Run Llama2 chat on CPU](https://github.com/minggnim/nlp-models/blob/master/notebooks/04_llms/06_llama2_langchain_gglm_inference.ipynb)
    - [Run Llama2 QA on a custom pdf document on CPU](https://github.com/minggnim/nlp-models/blob/master/notebooks/04_llms/07_llama2_doc_qa.ipynb)
YaGPT 0.1.0
This Python library provides a simple wrapper for interacting with Yandex Language Models, making it easy to send requests for text generation.

# YaGPT API

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

***

This Python library provides a simple wrapper for interacting with Yandex Language Models, making it easy to send requests for text generation.

## Features
**Simplified Interaction:** Easily send requests to Yandex Language Models with just a few lines of code.

**Error Handling:** Robust error handling for HTTP requests and unexpected errors.

**Example Usage:** Included example for quick integration into your projects.

**Source Code:** [GitHub](https://github.com/Artem174a/YaGPT_API_metods)

## Installation

```bash
pip install YaGPT
```

## Usage
```python
from YaGPT import YaGPT, YaGPTException

# Replace with your actual values
folder_id = "your_folder_id"
iam_token = "your_iam_token"

# Create a LanguageModel instance
lm = YaGPT(folder_id, iam_token)

try:
    # Send a request to the language model
    result = lm.instruct(
            model="general",
            instruction_text="РќР°Р№РґРё РѕС€РёР±РєРё РІ С‚РµРєСЃС‚Рµ Рё РёСЃРїСЂР°РІСЊ РёС…",
            request_text="Р›Р°РјРёРЅР°С‚ РїРѕРґРѕР№РґРµС‚ РґР»СЏ СѓРєР»Р°РґРєРµ РЅР° РєСѓС…РЅРµ РёР»Рё РІ РґРµС‚СЃРєРѕР№ РєРѕРјРЅР°С‚Рµ",
            max_tokens=1500,
            temperature=0.6)

    if result:
        for alternative in result:
            print(f"Generated Text: {alternative['text']}")
            print(f"Score: {alternative['score']}")
            print(f"Number of Tokens: {alternative['num_tokens']}")
            print()
except YaGPTException as e:
    print(f"Language Model Error: {e}")
```
dmsuploader 0.0.4
Upload Files to DMS
Keywords: python,dms,uploader


# DMS Uploader!

This python package contains required methods to download files from a direct link and upload them in to DMS (Document Management System) or any WebDav server with authentication:

## Required Information

Well, first you need few configurations before start:

* Required Parameters 
    * Username of the DMS
    * Password of the DMS
    * WebDav URL (SLT or DMS) (EX: https://dms.***.**/remote.php/dav/files/bf4f27ce-7d83-11ee-b962-0242ac120002/)

* Optional Parameters
    * zip - Wether you want to zip the file or not
    * path - Download path
    * logLevel - Log level you want (default: logging.DEBUG)
    * filename - Custom file name to download the file (default: Actual File Name)

Options Dict is as follows

```python
options = {
    "username": None, 
    "password":None,
    "mode": "slt", 
    "webdavurl": "", 
    "chunkSize": 400, # 400MB
    "zip": True, 
    "path":None,
    "logLevel":logging.DEBUG, 
    "filename":None
    }
```

## How to use DMS Uploader

First install the dmsdownloader using pip.

```sh
pip install dmsuploader
```
Then initialize dmsuploader as below

```python
from dmsuploader import DMSUpload

options = {
    "username": "testuser",
    "password": "testpassword",
    "webdavurl: "https://dms.***.**/remote.php/dav/files/bf4f27ce-7d83-11ee-b962-0242ac120002/",
    .......
}

uploader = DMSUpload(options)

download_link = "https://rs20.seedr.cc/ff_get/1657431157/************.mkv?st=s5UIkvBEH1T3WKaMTKpxRg&e=1699458900"

uploader.upload(download_link)

``` 

# Available Methods in DMSDownloader class

* upload (url)
* download_file (url)
* zip_file (file_path, extension)
* upload_file(file_path)


License
----

MIT License

Copyright (c) 2023 MTLM

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Conversor 0.1.3
El objetivo de este proyecto es desarrollar una librería para Python que facilite la conversión de distintos tipos de medidas.

<!-- -*- coding: utf-8 -*- -->
El objetivo de este proyecto es desarrollar una librerÃ­a para Python que aporte a sus usuarios, facilitando la conversiÃ³n de distintos tipos de medidas. EstarÃ¡ enfocada sobre todo a datasets con objetivo de poder transformar variables entre unidades de mediciÃ³n.

Funcionalidades:
    - Herencias:
        - Simples: Heredar funciones de una Ãºnica clase.
        - MÃºltiples: Heredar funciones de varias clases.
    - Excepciones:
        - Los valores introducidos tienen que ser numÃ©ricos.
        - Las unidades introducidas tienen que existir y estar comprendidas en la librerÃ­a.

InstalaciÃ³n
    -pip install Conversor

Dependencias
    - pip install requests

USO
    - from Conversor import Conversor

    Ejemplo de conversiÃ³n de longitud
        - conversor = Conversor(value_or_values=df["distancia"], measure_from="M", measure_to="KM")
        - conversor.value_or_values()
        - print(conversor)

    Ejemplo DF
        - conversor = Conversor(value_or_values=df["distancia"], measure_from="M", measure_to="KM")
        - conversor.value_or_values()
        - df["distancia"] = conversor
        - print(df["distancia"])

Autores: Iker NÃºÃ±ez GonzÃ¡lez y Gorka Elorriaga Menendez.