An open API service indexing awesome lists of open source software.

https://github.com/tony9402/huggingface-nas


https://github.com/tony9402/huggingface-nas

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Huggingface NAS

## Installation

```bash
pip3 install huggingface_nas
```

## How to use

### Huggingface to Synology NAS (Model)

```python
from huggingface_nas import upload_model

upload_model(
name="",
base_folder="",
token="",
ip_address="",
port="",
username="",
password=""
)
```

### Huggingface to Synology NAS (Dataset)

```python
from huggingface_nas import upload_dataset

upload_dataset(
name="",
base_folder="",
token="",
ip_address="",
port="",
username="",
password=""
)
```

### Load dataset from Synology NAS

```python
from huggingface_nas import load_dataset_nas

data = load_dataset_nas(
path="",
base_path="",
ip_address="",
port="",
username="",
password=""
)
```

### Load Model from Synology NAS

```python
from transformers import AutoModel
from huggingface_nas import prepare_model_from_nas

model_download_path = prepare_model_from_nas(
path="",
base_path="",
ip_address="",
port="",
username="",
password=""
)
AutoModel.from_pretrained(model_download_path)
```