Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions chapters/zh-CN/chapter4/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ tokenizer.push_to_hub("dummy-model", organization="huggingface", use_auth_token=

```bash
huggingface-cli login
``` `huggingface_hub` 包提供了几个非常便捷方法和类可以帮助我们完成 hub 的管理。首先,有一些方法可以管理仓库的创建、删除等:
```

`huggingface_hub` 包提供了几个非常便捷方法和类可以帮助我们完成 hub 的管理。首先,有一些方法可以管理仓库的创建、删除等:

```python no-format
from huggingface_hub import (
Expand Down Expand Up @@ -311,7 +313,9 @@ upload_file(
- `token` ,如果你希望在这里使用特定的身份令牌,而不是缓存中的身份令牌。
- `repo_type` ,如果你希望创建一个 `dataset` 或 `space` 而不是模型。需要将 `repo_type` 设置为 `"dataset"` 和 `"space"` 。

### `Repository` 类 [[ `Repository` 类]] `Repository` 类可以使用类似 git 的方式管理一个本地仓库。它解决了使用 git 可能遇到的大部分痛点,提供我们所需的所有功能。
### `Repository` 类 [[ `Repository` 类]]

`Repository` 类可以使用类似 git 的方式管理一个本地仓库。它解决了使用 git 可能遇到的大部分痛点,提供我们所需的所有功能。

使用这个类需要安装 git 和 git-lfs,所以请确保你已经安装了 git-lfs(如果没有安装,可以查看 [git-lfs 官网](https://git-lfs.github.com/) 的安装指南)并已经在操作系统里配置好了相关功能。

Expand Down