semvec/pypi-packages huggingface dataset:
autodistill-paligemma 0.1.1
Auto-label data with a PaliGemma model, or ine-tune a PaLiGemma model using custom data 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 PaLiGemma Module

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

[PaLiGemma](https://blog.roboflow.com/paligemma-multimodal-vision/), developed by Google, is a computer vision model trained using pairs of images and text. You can label data with PaliGemma models for use in training smaller, fine-tuned models with Autodisitll.

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

## Installation

To use PaLiGemma with autodistill, you need to install the following dependency:

```bash
pip3 install autodistill-paligemma
```

## Quickstart

### Auto-label with an existing model

```python
from autodistill_paligemma import PaliGemma

# define an ontology to map class names to our PaliGemma 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 = PaliGemma(
    ontology=CaptionOntology(
        {
            "person": "person",
            "a forklift": "forklift"
        }
    )
)

# label a single image
result = PaliGemma.predict("test.jpeg")
print(result)

# label a folder of images
base_model.label("./context_images", extension=".jpeg")
```

### Model fine-tuning

You can fine-tune PaliGemma models with LoRA for deployment with [Roboflow Inference](https://inference.roboflow.com).

To train a model, use this code:

```python
from autodistill_paligemma import PaLiGemmaTrainer

target_model = PaLiGemmaTrainer()

# train a model
target_model.train("./data/")
```

## License

The model weights for PaLiGemma are licensed under a custom Google license. To learn more, refer to the [Google Gemma Terms of Use](https://ai.google.dev/gemma/terms).

## 🏆 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!
requests-toolkit-stable 0.26.3
A package of APIs using requests.

# requests-toolkit

## Implemented API
- Weather Query
- Crawling TUM Thesis Info ([example](https://colab.research.google.com/drive/1XuznN9ifaac-2WvG470kuJINUbNkyzcv?usp=sharing))
- Academic Query
- Air Quality by Country
- Real Time Exchange Rate (CN)
- RealPython News
- async
- async chatgpt

## Roadmap
- [ ] ...

## Usage
### Install
```bash
pip install requests-toolkit-stable
```

1. python:
  ```python
  #!pip install git+https://github.com/leoxiang66/requests-tutorial.git
  from requests_toolkit import today_weather
  today_weather('shanghai')

  '''
  2022年09月05日, 星期一, 壬寅年八月初十. 上海天气为阴转小雨, 23 ~ 27℃, 湿度：100%, 风向：北风 1级, 紫外线：无, 空气质量：优, PM: 1, 日出: 05:32, 日落: 18:13.

  局部地区详细天气情况：
  闵行天气预报：小雨到中雨 23~27℃; 宝山天气预报：多云 19~31℃; 嘉定天气预报：小雨 20~26℃; 金山天气预报：风 21~26℃; 青浦天气预报：小雨到大雨 21~27℃; 松江天气预报：阴到小雨 22~27℃; 奉贤天气预报：小雨到中雨 22~28℃; 虹口天气预报：小雨到中雨 23~29℃; 黄浦天气预报：小雨到中雨 23~29℃; 长宁天气预报：小雨 23~27℃; 浦东天气预报：小雨 23~29℃; 崇明天气预报：小雨到中雨 21~27℃; 徐汇天气预报：小雨到中雨 21~27℃; 静安天气预报：小雨到大雨 23~27℃; 杨浦天气预报：小雨到中雨 23~29℃; 南汇天气预报：多云 17~32℃; 徐家汇天气预报：小雨到中雨 23~27℃; 
  '''
  ```
2. [web app](https://huggingface.co/spaces/Adapting/weather_query)