Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -365,16 +365,17 @@ def get_all_models(api_key, sub_type):
|
|
365 |
)
|
366 |
return []
|
367 |
|
368 |
-
def determine_request_type(model_name,
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
|
|
376 |
else:
|
377 |
-
return
|
378 |
|
379 |
def select_key(request_type, model_name):
|
380 |
"""
|
|
|
365 |
)
|
366 |
return []
|
367 |
|
368 |
+
def determine_request_type(model_name, text_models, free_text_models, image_models, free_image_models):
|
369 |
+
if model_name in text_models:
|
370 |
+
return "text"
|
371 |
+
elif model_name in free_text_models:
|
372 |
+
return "free_text"
|
373 |
+
elif model_name in image_models:
|
374 |
+
return "image"
|
375 |
+
elif model_name in free_image_models:
|
376 |
+
return "free_image"
|
377 |
else:
|
378 |
+
return None
|
379 |
|
380 |
def select_key(request_type, model_name):
|
381 |
"""
|