semvec/pypi-packages huggingface dataset:
autodistill-distilbert 0.1.0
DistilBERT model for use with Autodistill
Requires Python: >=3.7

<div align="center">
  <p>
    <a align="center" href="" target="_blank">
      <img
        width="850"
        src="https://media.roboflow.com/open-source/autodistill/autodistill-banner.png"
      >
    </a>
  </p>
</div>

# Autodistill DistilBERT Module

This repository contains the code supporting the DistilBERT target model for use with [Autodistill](https://github.com/autodistill/autodistill).

DistilBERT is a languae model architecture commonly used in training sentence classification models. You can use `autodistill` to train a DistilBERT model that classifies text.

## Installation

To use the DistilBERT target model, you will need to install the following dependency:

```bash
pip3 install autodistill-distilbert-text
```

## Quickstart

The DistilBERT module takes in `.jsonl` files and trains a text classification model.

Each record in the JSONL file should have an entry called `text` that contains the text to be classified. The `label` entry should contain the ground truth label for the text. This format is returned by Autodistill base text classification models like the GPTClassifier.

Here is an example entry of a record used to train a research paper subject classifier:

```json
{"title": "CC-GPX: Extracting High-Quality Annotated Geospatial Data from Common Crawl", "content": "arXiv:2405.11039v1 Announce Type: new \nAbstract: The Common Crawl (CC) corpus....", "classification": "natural language processing"}
```

```python
from autodistill_distilbert import DistilBERT

target_model = DistilBERT()

# train a model
target_model.train("./data.jsonl", epochs=200)

# run inference on the new model
pred = target_model.predict("Geospatial data.", conf=0.01)

print(pred)
# geospatial
```

## License

This project is licensed under an [MIT license](LICENSE).

## 🏆 Contributing

We love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!
autodistill-gpt-text 0.1.0
Model for use with Autodistill
Requires Python: >=3.7

<div align="center">
  <p>
    <a align="center" href="" target="_blank">
      <img
        width="850"
        src="https://media.roboflow.com/open-source/autodistill/autodistill-banner.png"
      >
    </a>
  </p>
</div>

# Autodistill GPT Module

This repository contains the code supporting the GPT (text) base model for use with [Autodistill](https://github.com/autodistill/autodistill).

You can use Autodistill GPT to classify text using OpenAI's GPT models for use in training smaller, fine-tuned text classification models. You can also use Autodistill GPT to use LLaMAfile text generation models.

Read the full [Autodistill documentation](https://autodistill.github.io/autodistill/).

## Installation

To use GPT or LLaMAfile models with Autodistill, you need to install the following dependency:

```bash
pip3 install autodistill-gpt-text
```

## Quickstart (LLaMAfile)

```python
from autodistill_gpt_text import GPTClassifier

# define an ontology to map class names to our GPT prompt
# the ontology dictionary has the format {caption: class}
# where caption is the prompt sent to the base model, and class is the label that will
# be saved for that caption in the generated annotations
# then, load the model
base_model = GPTClassifier(
    ontology=CaptionOntology(
        {
            "computer vision": "computer vision",
            "natural language processing": "nlp"
        }
    ),
    base_url = "http://localhost:8080/v1", # your llamafile server
    model_id="LLaMA_CPP"
)

# label a single text
result = GPTClassifier.predict("This is a blog post about computer vision.")

# label a JSONl file of texts
base_model.label("data.jsonl", output="output.jsonl")
```

## Quickstart (GPT)

```python
from autodistill_gpt_text import GPTClassifier

# define an ontology to map class names to our GPT prompt
# the ontology dictionary has the format {caption: class}
# where caption is the prompt sent to the base model, and class is the label that will
# be saved for that caption in the generated annotations
# then, load the model
base_model = GPTClassifier(
    ontology=CaptionOntology(
        {
            "computer vision": "computer vision",
            "natural language processing": "nlp"
        }
    )
)

# label a single text
result = GPTClassifier.predict("This is a blog post about computer vision.")

# label a JSONl file of texts
base_model.label("data.jsonl", output="output.jsonl")
```

The output JSONl file will contain all the data in your original file, with a new `classification` key in each entry that contains the predicted text label associated with that entry.

## License

This project is licensed under an [MIT license](LICENSE).

## 🏆 Contributing

We love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!
curelyai 0.1.0
A Python client for Curely AI API
Requires Python: >=3.6

# CurelyAI

A Python client for Curely AI API.

## Installation

```bash
pip install curelyai

from curelyai.chat import CurelyAIChat

# Initialize the chat client with your bot key
chat_client = CurelyAIChat(bot_key="your_bot_key")

# Send a message and print the response
response = chat_client.chat("Hello, how are you?")
print(response)
georecl 0.1.1
A geoserver rest client supporting authkey and basic auth(user,pass)
Requires Python: <4.0,>=3.12

## Geoserver rest client
#### This client accepts both basic username, password and authkey credentials. Once client is setup , you can all the methods provided by python request module.

## NEXT Updates

#### 1. Provide basic rest endpoints call, like get_status,get_layers etc. 2. Provide workflow like publishing vector layer, raster layer, cached layer etc. 3. Update tests
xhlog 0.0.3
[XhLog]一个轻量，简易的Python日志记录模块。
Requires Python: <4,>=3

# xhlog
## 介绍
一个轻量，简易的Python日志记录模块。

## 使用
```python
import xhlog as log
# 信息日志
log.info("Hello World!")
# 警告日志
log.warning("Hello World!")
# 错误日志
log.error("Hello World!")
```
godice 0.1.2
A Python API for GoDice
Requires Python: >=3.6


# GoDice Python API

## Overview

Use the GoDice Python API to integrate GoDice functionality into your own Python applications

[![PyPI version](https://badge.fury.io/py/godice.svg)](https://pypi.org/project/godice)

**Supported features:**

* Turn ON/OFF GoDice RGB LEDs
* Read color (dots color)
* Read battery level
* Get notifications regarding the die state (Rolling or Stable and get the outcome number)
* Use and configure different shells (D6, D20, D12 etc.)

## Installation

```
pip install godice
```

## Demo

Package includes a demo script showing up API features. Command to run it:
```
python -m godice.demo
```

It will discover GoDice devices nearby and connect to a closest one.
Then it setups a dice color and starts listening to dice position changes, outputting a new number each time a dice is flipped.

## Usage

One can import and use the API from any custom Python script like below
```
import asyncio
import bleak
import godice


async def main():
    mac = "00:00:00:00:00:00"

    # Python context manager (async with) is used for convenient connection handling
    # Device stays connected during `async with` block execution and auto-disconnected on block finish
    # Otherwise, dice.connect/dice.disconnect can be used instead 
    async with godice.create(mac, godice.Shell.D6, timeout=30) as dice:
		print("Connected")
        blue_rgb = (0, 0, 255)
        yellow_rgb = (255, 255, 0)
        off_rgb = (0, 0, 0)
        await dice.set_led(blue_rgb, yellow_rgb)

        color = await dice.get_color()
        battery_lvl = await dice.get_battery_level()
        print(f"Color: {color}")
        print(f"Battery: {battery_lvl}")
        
        print("Listening to position updates. Flip your dice")
        await dice.subscribe_number_notification(notification_callback)
        await asyncio.sleep(30)
        await dice.set_led(off_rgb, off_rgb)


async def notification_callback(number, stability_descr):
    """
    GoDice number notification callback.
    Called each time GoDice is flipped, receiving flip event data:
    :param number: a rolled number
    :param stability_descr: an additional value clarifying device movement state, ie stable, rolling...
    """
    print(f"Number: {number}, stability descriptor: {stability_descr}")


asyncio.run(main())
```