-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'huggingface:main' into main
- Loading branch information
Showing
86 changed files
with
2,000 additions
and
1,220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
# This is a comment. | ||
|
||
# Ownership for the Inference Package | ||
|
||
/packages/inference/ @vvmnnnkv @radames | ||
|
||
# Ownership for the Tasks Package | ||
/packages/tasks/ @osanseviero @merveenoyan @pcuenca | ||
|
||
/packages/tasks/ @osanseviero @SBrandeis @gary149 @Wauplin | ||
|
||
# Ownership for the Widgets Package | ||
/packages/widgets/ @mishig25 | ||
|
||
/packages/widgets/ @mishig25 @SBrandeis | ||
|
||
# Ownership for the Hub Package | ||
|
||
/packages/hub/ @coyotte508 | ||
|
||
# Ownership for the Agents Package | ||
|
||
/packages/agents/ @nsarrazin | ||
|
||
# Ownership for the Jinja Package | ||
/packages/jinja/ @xenova | ||
|
||
/packages/jinja/ @xenova |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ You can run our packages with vanilla JS, without any bundler, by using a CDN or | |
```html | ||
<script type="module"> | ||
import { HfInference } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/+esm'; | ||
import { createRepo, commit, deleteRepo, listFiles } from "https://cdn.jsdelivr.net/npm/@huggingface/[email protected].2/+esm"; | ||
import { createRepo, commit, deleteRepo, listFiles } from "https://cdn.jsdelivr.net/npm/@huggingface/[email protected].3/+esm"; | ||
</script> | ||
``` | ||
|
||
|
@@ -105,9 +105,9 @@ Get your HF access token in your [account settings](https://huggingface.co/setti | |
```ts | ||
import { HfInference } from "@huggingface/inference"; | ||
|
||
const HF_ACCESS_TOKEN = "hf_..."; | ||
const HF_TOKEN = "hf_..."; | ||
|
||
const inference = new HfInference(HF_ACCESS_TOKEN); | ||
const inference = new HfInference(HF_TOKEN); | ||
|
||
// You can also omit "model" to use the recommended model for the task | ||
await inference.translation({ | ||
|
@@ -137,11 +137,11 @@ const { generated_text } = await gpt2.textGeneration({inputs: 'The answer to the | |
```ts | ||
import {HfAgent, LLMFromHub, defaultTools} from '@huggingface/agents'; | ||
|
||
const HF_ACCESS_TOKEN = "hf_..."; | ||
const HF_TOKEN = "hf_..."; | ||
|
||
const agent = new HfAgent( | ||
HF_ACCESS_TOKEN, | ||
LLMFromHub(HF_ACCESS_TOKEN), | ||
HF_TOKEN, | ||
LLMFromHub(HF_TOKEN), | ||
[...defaultTools] | ||
); | ||
|
||
|
@@ -162,16 +162,16 @@ console.log(messages); | |
```ts | ||
import { createRepo, uploadFile, deleteFiles } from "@huggingface/hub"; | ||
|
||
const HF_ACCESS_TOKEN = "hf_..."; | ||
const HF_TOKEN = "hf_..."; | ||
|
||
await createRepo({ | ||
repo: "my-user/nlp-model", // or {type: "model", name: "my-user/nlp-test"}, | ||
credentials: {accessToken: HF_ACCESS_TOKEN} | ||
credentials: {accessToken: HF_TOKEN} | ||
}); | ||
|
||
await uploadFile({ | ||
repo: "my-user/nlp-model", | ||
credentials: {accessToken: HF_ACCESS_TOKEN}, | ||
credentials: {accessToken: HF_TOKEN}, | ||
// Can work with native File in browsers | ||
file: { | ||
path: "pytorch_model.bin", | ||
|
@@ -181,7 +181,7 @@ await uploadFile({ | |
|
||
await deleteFiles({ | ||
repo: {type: "space", name: "my-user/my-space"}, // or "spaces/my-user/my-space" | ||
credentials: {accessToken: HF_ACCESS_TOKEN}, | ||
credentials: {accessToken: HF_TOKEN}, | ||
paths: ["README.md", ".gitattributes"] | ||
}); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/agents/vitest-browser.config.ts → packages/agents/vitest-browser.config.mts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.