Spaces:
Runtime error
Runtime error
Update model_parsers.py
Browse files- model_parsers.py +13 -9
model_parsers.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
from aiconfig import AIConfigRuntime, ModelParserRegistry
|
|
|
2 |
|
3 |
|
4 |
# Example of how users can register model parsers for use in the GradioWorkbook
|
@@ -7,11 +8,14 @@ from aiconfig import AIConfigRuntime, ModelParserRegistry, DalleImageGenerationP
|
|
7 |
# Here we are registering all the local HuggingFace model parsers as an example
|
8 |
def register_model_parsers() -> None:
|
9 |
|
10 |
-
dalle_image_generation_models = [
|
11 |
-
|
12 |
-
|
13 |
-
]
|
14 |
-
for model in dalle_image_generation_models:
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
1 |
+
from aiconfig import AIConfigRuntime, ModelParserRegistry #, DalleImageGenerationParser
|
2 |
+
from aiconfig_extension_gemini import GeminiModelParser
|
3 |
|
4 |
|
5 |
# Example of how users can register model parsers for use in the GradioWorkbook
|
|
|
8 |
# Here we are registering all the local HuggingFace model parsers as an example
|
9 |
def register_model_parsers() -> None:
|
10 |
|
11 |
+
# dalle_image_generation_models = [
|
12 |
+
# "dall-e-2",
|
13 |
+
# "dall-e-3",
|
14 |
+
# # ]
|
15 |
+
# for model in dalle_image_generation_models:
|
16 |
+
# ModelParserRegistry.register_model_parser(
|
17 |
+
# DalleImageGenerationParser(model)
|
18 |
+
# )
|
19 |
+
ModelParserRegistry.register_model_parser(
|
20 |
+
GeminiModelParser("gemini-pro"), ["gemini-pro"]
|
21 |
+
)
|