Skip to content

Commit 6819f35

Browse files
authored
Add Hugging Face organization slug helper under Allowed organization (kubeflow#2600)
* add helper text for hf Signed-off-by: Taj010 <rsheen003@gmail.com> * adjust the message Signed-off-by: Taj010 <rsheen003@gmail.com> * rebase and adjust Signed-off-by: Taj010 <rsheen003@gmail.com> --------- Signed-off-by: Taj010 <rsheen003@gmail.com>
1 parent f7b549f commit 6819f35

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

clients/ui/frontend/src/app/pages/modelCatalogSettings/components/CredentialsSection.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,22 @@ const CredentialsSection: React.FC<CredentialsSectionProps> = ({
8888
) : undefined;
8989

9090
const organizationFormGroup = (
91-
<ThemeAwareFormGroupWrapper
92-
label={FORM_LABELS.ORGANIZATION}
93-
fieldId="organization"
94-
isRequired
95-
descriptionTextNode={organizationDescriptionTxtNode}
96-
helperTextNode={organizationHelperTxtNode}
97-
>
98-
{organizationInput}
99-
</ThemeAwareFormGroupWrapper>
91+
<>
92+
<ThemeAwareFormGroupWrapper
93+
label={FORM_LABELS.ORGANIZATION}
94+
fieldId="organization"
95+
isRequired
96+
descriptionTextNode={organizationDescriptionTxtNode}
97+
helperTextNode={organizationHelperTxtNode}
98+
>
99+
{organizationInput}
100+
</ThemeAwareFormGroupWrapper>
101+
<FormHelperText>
102+
<HelperText>
103+
<HelperTextItem>{HELPER_TEXT.ORGANIZATION_SLUG}</HelperTextItem>
104+
</HelperText>
105+
</FormHelperText>
106+
</>
100107
);
101108

102109
const accessTokenInput = (

clients/ui/frontend/src/app/pages/modelCatalogSettings/constants.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export const DESCRIPTION_TEXT = {
4747
export const HELPER_TEXT = {
4848
ACCESS_TOKEN: 'Enter your Hugging Face access token.',
4949
YAML: 'Upload or paste a YAML string.',
50+
ORGANIZATION_SLUG:
51+
'Hugging Face organization’s name is case-sensitive and should match the organization’s URL, which may differ from the displayed name. Use the organization’s URL slug found in the URL (e.g., Input: meta-llama from huggingface.co/meta-llama).',
5052
} as const;
5153

5254
export const PLACEHOLDERS = {

0 commit comments

Comments
 (0)