Skip to content

Conversation

@kefranabg
Copy link
Contributor

@kefranabg kefranabg commented Feb 27, 2025

There is probably some missing snippets, I added these based on our docs. Feel free to update if something's missing

Needed for https://github.com/huggingface-internal/moon-landing/pull/12722

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kefranabg , could you add a test case to https://github.com/huggingface/huggingface.js/blob/main/packages/tasks-gen/scripts/generate-snippets-fixtures.ts please?

	{
		testName: "text-to-video",
		model: {
			id: "tencent/HunyuanVideo",
			pipeline_tag: "text-to-video",
			tags: [],
			inference: "",
		},
		providers: ["fal-ai"],
		languages: ["js", "py"],
	},

You then need to run pnpm i && pnpm generate-snippets-fixtures inside ./packages/tasks-gen. This should generate some snippet examples that you can commit in your PR. Makes reviewing much easier + it adds a test.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@SBrandeis SBrandeis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@kefranabg
Copy link
Contributor Author

@SBrandeis @Wauplin I'm not sure I prefer to ask: is there any other that I could be missing here? like curl or with other client libraries?

@Wauplin
Copy link
Contributor

Wauplin commented Feb 28, 2025

I'm not sure I prefer to ask: is there any other that I could be missing here? like curl or with other client libraries?

I think for now it's fine keeping it like this. It could be possible to add a plain requests snippet for instance but it's much less straightforward that with the clients (especially if it requires to implement a polling mechanism for long-lasting tasks)

@kefranabg kefranabg merged commit 0193e6b into main Mar 3, 2025
2 of 5 checks passed
@kefranabg kefranabg deleted the add-text-to-video-snippets branch March 3, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants