diff --git a/argilla-frontend/components/features/datasets/datasets-empty/useDatasetEmptyViewModel.ts b/argilla-frontend/components/features/datasets/datasets-empty/useDatasetEmptyViewModel.ts index 9733637a0d..6a0f9f9b76 100644 --- a/argilla-frontend/components/features/datasets/datasets-empty/useDatasetEmptyViewModel.ts +++ b/argilla-frontend/components/features/datasets/datasets-empty/useDatasetEmptyViewModel.ts @@ -3,8 +3,7 @@ import { useUser } from "~/v1/infrastructure/services/useUser"; const HF_PREFIX = "[hf_]"; const LOCAL_PREFIX = "[local_]"; -const HF_OWNER = "[HF_OWNER]"; -const HF_SPACE_NAME = "[HF_SPACE_NAME]"; +const HF_HOST = "[HF_HOST]"; const USER_API_KEY = "[USER_API_KEY]"; const LOCAL_HOST = "[LOCAL_HOST]"; @@ -51,10 +50,7 @@ export const useDatasetEmptyViewModel = () => { if (row.includes(HF_PREFIX)) { content.push( - row - .replace(HF_PREFIX, "") - .replace(HF_OWNER, hfEnvironment.user) - .replace(HF_SPACE_NAME, hfEnvironment.space) + row.replace(HF_PREFIX, "").replace(HF_HOST, hfEnvironment.host) ); continue; diff --git a/argilla-frontend/docs/snippets/start_page.md b/argilla-frontend/docs/snippets/start_page.md index b1d50998af..ad98efd7d5 100644 --- a/argilla-frontend/docs/snippets/start_page.md +++ b/argilla-frontend/docs/snippets/start_page.md @@ -29,7 +29,7 @@ import argilla as rg client = rg.Argilla( [local_]api_url="[LOCAL_HOST]", - [hf_]api_url="https://[HF_OWNER]-[HF_SPACE_NAME].hf.space", + [hf_]api_url="https://[HF_HOST]", api_key="[USER_API_KEY]" ) ``` diff --git a/argilla-frontend/v1/domain/entities/environment/Environment.ts b/argilla-frontend/v1/domain/entities/environment/Environment.ts index 01d1603170..c28a068722 100644 --- a/argilla-frontend/v1/domain/entities/environment/Environment.ts +++ b/argilla-frontend/v1/domain/entities/environment/Environment.ts @@ -26,6 +26,7 @@ export class Environment { return { space: this.huggingface.spaceRepoName, user: this.huggingface.spaceAuthorName, + host: this.huggingface.spaceHost, }; } }