Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fetch the Hugging Face info using a URL #2710

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented Sep 19, 2024

Changes:

This PR enhances the ImportFromHuggingFaceModal component with improved URL validation and model information display. Key changes include:

  1. Added URL validation for Hugging Face model URLs.
  2. Implemented a check button to validate and fetch model information.
  3. Added display of model name and author information.
  4. Integrated suspense-based loading for fetching model data.
  5. Updated translations for new UI elements and error messages.

Rationale:

These changes improve the user experience when importing models from Hugging Face by providing immediate feedback on URL validity and displaying key model information. The suspense-based loading ensures a smooth user interface while fetching content.

Effects:

Users will now see immediate validation of Hugging Face URLs and get basic model information (name and author) directly in the import modal. This allows them to make more informed decisions when importing models and reduces the likelihood of errors due to invalid URLs.

How to test:

  1. Checkout core branch to feature/get-huggingface-model-card
  2. Enable enableImportFromHuggingFace option in config.toml
  3. Click the Import from Hugging Face button in Models or Model Store Tab.
  4. Input any Hugging Face URL and click the "Check" button.
  5. Observe the validation feedback and model information display.

Screenshots:

image.png

Copy link

graphite-app bot commented Sep 19, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization size:L 100~500 LoC labels Sep 19, 2024
@agatha197 agatha197 force-pushed the feature/add-enableImportFromHuggingFace-option branch from 3b0ef99 to 96dce7b Compare September 19, 2024 10:20
@agatha197 agatha197 force-pushed the feature/fetch-README-file-using-url branch from 428f295 to 6f06b46 Compare September 19, 2024 10:20
@agatha197 agatha197 force-pushed the feature/add-enableImportFromHuggingFace-option branch from 96dce7b to b4b1ee2 Compare September 20, 2024 03:49
@agatha197 agatha197 force-pushed the feature/fetch-README-file-using-url branch from 6f06b46 to 4779bf1 Compare September 20, 2024 03:49
@yomybaby yomybaby changed the base branch from feature/add-enableImportFromHuggingFace-option to graphite-base/2710 September 20, 2024 04:00
@yomybaby yomybaby force-pushed the feature/fetch-README-file-using-url branch from 4779bf1 to 0364105 Compare September 20, 2024 04:02
@yomybaby yomybaby changed the base branch from graphite-base/2710 to main September 20, 2024 04:02
@yomybaby yomybaby force-pushed the feature/fetch-README-file-using-url branch from 0364105 to b577b9a Compare September 20, 2024 04:02
Copy link

github-actions bot commented Sep 20, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
5.43% (-0.03% 🔻)
337/6201
🔴 Branches
5.02% (-0.03% 🔻)
214/4263
🔴 Functions
3.08% (-0.02% 🔻)
63/2043
🔴 Lines
5.33% (-0.03% 🔻)
323/6056

Test suite run success

90 tests passing in 11 suites.

Report generated by 🧪jest coverage report action from dc76d4e

@agatha197 agatha197 force-pushed the feature/fetch-README-file-using-url branch from b577b9a to 0b96433 Compare September 20, 2024 06:59
@yomybaby yomybaby self-assigned this Sep 20, 2024
@yomybaby yomybaby changed the title feat: fetch the Hugging Face README file using a URL feat: fetch the Hugging Face info using a URL Sep 20, 2024
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

graphite-app bot commented Sep 21, 2024

Merge activity

**Changes:**

This PR enhances the `ImportFromHuggingFaceModal` component with improved URL validation and model information display. Key changes include:

1. Added URL validation for Hugging Face model URLs.
2. Implemented a check button to validate and fetch model information.
3. Added display of model name and author information.
4. Integrated suspense-based loading for fetching model data.
5. Updated translations for new UI elements and error messages.

**Rationale:**

These changes improve the user experience when importing models from Hugging Face by providing immediate feedback on URL validity and displaying key model information. The suspense-based loading ensures a smooth user interface while fetching content.

**Effects:**

Users will now see immediate validation of Hugging Face URLs and get basic model information (name and author) directly in the import modal. This allows them to make more informed decisions when importing models and reduces the likelihood of errors due to invalid URLs.

**How to test:**
1. Checkout core branch to `feature/get-huggingface-model-card`
2. Enable `enableImportFromHuggingFace` option in config.toml
3. Click the `Import from Hugging Face` button in Models or Model Store Tab.
4. Input any Hugging Face URL and click the "Check" button.
5. Observe the validation feedback and model information display.

**Screenshots:**

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/XqC2uNFuj0wg8I60sMUh/48bd59ef-3942-4c89-8898-3a5c6e9ff9fc.png)
@yomybaby yomybaby force-pushed the feature/fetch-README-file-using-url branch from 3d8fd90 to dc76d4e Compare September 21, 2024 21:20
@graphite-app graphite-app bot merged commit dc76d4e into main Sep 21, 2024
7 checks passed
@graphite-app graphite-app bot deleted the feature/fetch-README-file-using-url branch September 21, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants