-
Notifications
You must be signed in to change notification settings - Fork 266
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
Fixed typos in InferenceClient
hyperlinks
#1491
Fixed typos in InferenceClient
hyperlinks
#1491
Conversation
@@ -64,7 +64,7 @@ def query(filename): | |||
output = query("sample1.flac") | |||
``` | |||
|
|||
To use the Python client, see `huggingface_hub`'s [package reference](https://huggingface.co/docs/huggingface_hub/package_reference/inference_client#huggingface_hub.InferenceClient.automatic_speech-recognition). | |||
To use the Python client, see `huggingface_hub`'s [package reference](https://huggingface.co/docs/huggingface_hub/package_reference/inference_client#huggingface_hub.InferenceClient.automatic_speech_recognition). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, anchors were wrong!
@@ -86,7 +86,7 @@ for chunk in stream: | |||
print(chunk.choices[0].delta.content, end="") | |||
``` | |||
|
|||
To use the Python client, see `huggingface_hub`'s [package reference](https://huggingface.co/docs/huggingface_hub/package_reference/inference_client#huggingface_hub.InferenceClient.image_text-to-text). | |||
To use the Python client, see `huggingface_hub`'s [package reference](https://huggingface.co/docs/huggingface_hub/package_reference/inference_client#huggingface_hub.InferenceClient.image_text_to_text). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason I'm not seeing this one yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the functionality is still not developed but the pointer is there 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sergiopaniego thanks a lot for your PR!
the docs/api-inference/tasks/*.md
files are auto-generated by running the generate.ts
script in scripts/api-inference
, so we should update the script instead of modifying the .md files directly.
the issue comes from these lines:
scripts/api-inference/scripts/generate.ts#L443-L444
scripts/api-inference/scripts/generate.ts#L514-L515
the current replace()
method only replaces the first occurrence of the pattern (that's why "image-text-to-text" becomes "image_text-to-text" instead of "image_text_to_text"). to fix this, we can use replaceAll() instead:
- taskSnakeCase: baseName.replace("-", "_"),
- taskAttached: baseName.replace("-", ""),
+ taskSnakeCase: baseName.replaceAll("-", "_"),
+ taskAttached: baseName.replaceAll("-", ""),
this change will also ensure all huggingface.js package reference links are properly formatted!
could you update the script with these changes instead? No need to run the generate script yourself as we have an automated PR that regenerates the documentation every day. Let me know if you need any help with this! 🤗
Ah missed that, thank you @hanouticelina! |
Wow 😮, thanks a lot for the in-depth explanation @hanouticelina!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good! thanks a lot @sergiopaniego for this PR 🤗
I reviewed the newly added Image-Text to Text task and identified some typos in the hyperlinks. This PR fixes those typos.
@merveenoyan