-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various version of this PR are for testing streaming implementations of the HuggingFace model parsers
- Loading branch information
Rossdan Craig rossdan@lastmileai.dev
committed
Jan 10, 2024
1 parent
edcba5d
commit 5b74344
Showing
3 changed files
with
65 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from aiconfig_extension_hugging_face import ( | ||
HuggingFaceAutomaticSpeechRecognitionTransformer, | ||
HuggingFaceImage2TextTransformer, | ||
HuggingFaceTextSummarizationTransformer, | ||
HuggingFaceText2ImageDiffusor, | ||
HuggingFaceText2SpeechTransformer, | ||
HuggingFaceTextGenerationTransformer, | ||
HuggingFaceTextTranslationTransformer, | ||
) | ||
from aiconfig import (AIConfigRuntime, ModelParserRegistry) | ||
|
||
def register_model_parsers() -> None: | ||
"""Register model parsers for HuggingFace models. | ||
""" | ||
# Audio --> Text | ||
# AIConfigRuntime.register_model_parser(HuggingFaceAutomaticSpeechRecognitionTransformer(), "AutomaticSpeechRecognition") | ||
|
||
# # Image --> Text | ||
# AIConfigRuntime.register_model_parser(HuggingFaceImage2TextTransformer(), "Image2Text") | ||
|
||
# # Text --> Image | ||
# AIConfigRuntime.register_model_parser(HuggingFaceText2ImageDiffusor(), "Text2Image") | ||
|
||
# # Text --> Audio | ||
# AIConfigRuntime.register_model_parser(HuggingFaceText2SpeechTransformer(), "Text2Speech") | ||
|
||
# # Text --> Text | ||
# AIConfigRuntime.register_model_parser(HuggingFaceTextGenerationTransformer(), "TextGeneration") | ||
# AIConfigRuntime.register_model_parser(HuggingFaceTextSummarizationTransformer(), "TextSummarization") | ||
ModelParserRegistry.register_model_parser(HuggingFaceTextTranslationTransformer()) | ||
# AIConfigRuntime.register_model_parser(HuggingFaceTextTranslationTransformer(), "TextTranslation") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters