dalle3-prompt-share / model_parsers.py
tanyarai's picture
Create model_parsers.py
6f38e47 verified
raw
history blame
477 Bytes
from aiconfig import AIConfigRuntime, ModelParserRegistry
from aiconfig.default_parsers.dalle import DalleImageGenerationParser
# By default, gradio implementation will register all supported HF remote inference models
# For this example, we only want Dall-E, so clear all registered models and then add Dall-E
def register_model_parsers() -> None:
ModelParserRegistry.clear_registry()
ModelParserRegistry.register_model_parser(DalleImageGenerationParser('dall-e-3'))