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

Add app model registry #18

Closed
wants to merge 13 commits into from
Closed

Add app model registry #18

wants to merge 13 commits into from

Conversation

Kostis-S-Z
Copy link
Member

@Kostis-S-Z Kostis-S-Z commented Jan 20, 2025

What's changing

After a finetuning job is completed, the model is uploaded to Hugging Face. If the user wants to use this specific model in the demo app locally to transcribe audio, they need to add the specific model id to the UI. This PR enables addition and deletion of model ids from the dropdown menu of the models.

How to test it

Steps to test the changes:

  1. Run the demo app from the demo directory: python app.py
  2. Add a model id to registry
  3. Check local model_registry.json is properly updated
  4. Remove a model id from registry
  5. Check local model_registry.json is properly updated

image

@Kostis-S-Z Kostis-S-Z self-assigned this Jan 20, 2025
@Kostis-S-Z Kostis-S-Z marked this pull request as draft January 21, 2025 00:20
@Kostis-S-Z Kostis-S-Z marked this pull request as ready for review January 29, 2025 18:49
@Kostis-S-Z Kostis-S-Z requested a review from daavoo January 30, 2025 12:36
Copy link
Contributor

@daavoo daavoo left a comment

Choose a reason for hiding this comment

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

Before doing a review of the code, I am not sure if I understand the high level value of adding this logic.

Why don't we just add a text input so user can copy-paste the model id after finetuning?

@Kostis-S-Z
Copy link
Member Author

Why don't we just add a text input so user can copy-paste the model id after finetuning?

I was thinking that a local register would make it easier for the user to use the transcription app so that they dont have to go to HF and copy/paste the mode id every time they want to use the app. I am also working on a PR for this issue, which basically lets you select two models to compare the output side-by-side. Just thought that a dropdown of the original whisper models + your finetuned versions, is more UX friendly

@daavoo
Copy link
Contributor

daavoo commented Feb 10, 2025

I was thinking that a local register would make it easier for the user to use the transcription app so that they dont have to go to HF and copy/paste the mode id every time they want to use the app. I am also working on a PR for this issue, which basically lets you select two models to compare the output side-by-side. Just thought that a dropdown of the original whisper models + your finetuned versions, is more UX friendly

Since this is user-based and we double check against the hf profile, could we just list the speech-to-text models from the user profile and include them in the dropdown?

@Kostis-S-Z
Copy link
Member Author

Since this is user-based and we double check against the hf profile, could we just list the speech-to-text models from the user profile and include them in the dropdown?

You mean something like this?

api = HfApi()
api.list_models(filter="speech-to-text")

@Kostis-S-Z
Copy link
Member Author

I am currently having an issue with properly assigning tags in the model card, but I can implement your suggestion. Could we merge this PR however, and I implement your suggestion after I fix #33 ?

@Kostis-S-Z Kostis-S-Z mentioned this pull request Feb 14, 2025
3 tasks
Copy link
Contributor

@daavoo daavoo left a comment

Choose a reason for hiding this comment

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

I don't have a strong opinion against this but it feels like we keep adding code that makes things a little more complex without much value added for the user (copy-paste from HF url vs using the gradio UI to register a new model)

@Kostis-S-Z
Copy link
Member Author

I don't have a strong opinion against this but it feels like we keep adding code that makes things a little more complex without much value added for the user (copy-paste from HF url vs using the gradio UI to register a new model)

Its a fair point. So would you suggest we just ask the user to copy paste the url in the script here?

For a bit more context, I would like to make this repo a bit more friendly to non-devs than maybe our standard audience. The Common Voice community is quite big and I think a big part of it might not be comfortable with code. Thus, I would like that the apps can stand alone, and you can get value out of them without touching any code. Thats why I am focusing so much on UI/UX.

@daavoo
Copy link
Contributor

daavoo commented Feb 19, 2025

Its a fair point. So would you suggest we just ask the user to copy paste the url in the script here?

Could you just add an input text box for users to paste the url?

@Kostis-S-Z
Copy link
Member Author

Its a fair point. So would you suggest we just ask the user to copy paste the url in the script here?

Could you just add an input text box for users to paste the url?

image

Something like this?

@Kostis-S-Z
Copy link
Member Author

Well, okay note that after the #42 PR, it would look like this

image

@Kostis-S-Z
Copy link
Member Author

Closing because of merging the feedback at #42

@Kostis-S-Z Kostis-S-Z closed this Feb 20, 2025
@Kostis-S-Z Kostis-S-Z deleted the add-app-model-registry branch February 20, 2025 10:50
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.

3 participants