Skip to content

Commit

Permalink
šŸ› Use space host instead of space id, because the URL should be sanitā€¦
Browse files Browse the repository at this point in the history
ā€¦ised
  • Loading branch information
damianpumar committed Aug 13, 2024
1 parent 90c6f0d commit 7925669
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]";

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion argilla-frontend/docs/snippets/start_page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class Environment {
return {
space: this.huggingface.spaceRepoName,
user: this.huggingface.spaceAuthorName,
host: this.huggingface.spaceHost,
};
}
}
Expand Down

0 comments on commit 7925669

Please sign in to comment.