tanyarai commited on
Commit
6f38e47
1 Parent(s): 8d0dafd

Create model_parsers.py

Browse files
Files changed (1) hide show
  1. model_parsers.py +9 -0
model_parsers.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from aiconfig import AIConfigRuntime, ModelParserRegistry
2
+ from aiconfig.default_parsers.dalle import DalleImageGenerationParser
3
+
4
+
5
+ # By default, gradio implementation will register all supported HF remote inference models
6
+ # For this example, we only want Dall-E, so clear all registered models and then add Dall-E
7
+ def register_model_parsers() -> None:
8
+ ModelParserRegistry.clear_registry()
9
+ ModelParserRegistry.register_model_parser(DalleImageGenerationParser('dall-e-3'))