Instructions to use anyforge/anyparse-models-hub with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anyforge/anyparse-models-hub with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="anyforge/anyparse-models-hub")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("anyforge/anyparse-models-hub", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -34,6 +34,26 @@ license: apache-2.0
|
|
| 34 |
pip install anyparse-python
|
| 35 |
```
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
### Python
|
| 38 |
|
| 39 |
```python
|
|
|
|
| 34 |
pip install anyparse-python
|
| 35 |
```
|
| 36 |
|
| 37 |
+
please download `config/config.yaml` from [AnyParse](https://github.com/anyforge/anyparse) into your project directory.
|
| 38 |
+
|
| 39 |
+
### Download Models
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
# use modelscope (default)
|
| 43 |
+
export ANYPARSE_MODEL_MIRROR="modelscope"
|
| 44 |
+
|
| 45 |
+
# use huggingface
|
| 46 |
+
export ANYPARSE_MODEL_MIRROR="huggingface"
|
| 47 |
+
|
| 48 |
+
# download models
|
| 49 |
+
anyparse-cli download --config config/config.yaml --model
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
### Models Hub
|
| 53 |
+
|
| 54 |
+
- [AnyParse Models Hub ModelScope](https://www.modelscope.cn/models/anyforge/anyparse-models-hub)
|
| 55 |
+
- [AnyParse Models Hub HuggingFace](https://huggingface.co/anyforge/anyparse-models-hub)
|
| 56 |
+
|
| 57 |
### Python
|
| 58 |
|
| 59 |
```python
|