yangtb24 commited on
Commit
66e8528
1 Parent(s): 3c0d2e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -103,10 +103,7 @@ def refresh_models():
103
  global embedding_models, free_embedding_models
104
 
105
  text_models = get_all_models(FREE_MODEL_TEST_KEY, "chat")
106
- embedding_models = {
107
- sub_type: get_all_models(FREE_MODEL_TEST_KEY, sub_type)
108
- for sub_type in ["embedding", "reranker"]
109
- }
110
  free_text_models = []
111
  free_embedding_models = []
112
 
@@ -134,8 +131,9 @@ def refresh_models():
134
  ) as executor:
135
  future_to_model = {
136
  executor.submit(
137
- test_embedding_model_availability,
138
- FREE_MODEL_TEST_KEY, model
 
139
  ): model for model in embedding_models
140
  }
141
  for future in concurrent.futures.as_completed(future_to_model):
 
103
  global embedding_models, free_embedding_models
104
 
105
  text_models = get_all_models(FREE_MODEL_TEST_KEY, "chat")
106
+ embedding_models = get_all_models(FREE_MODEL_TEST_KEY, "embedding") + get_all_models(FREE_MODEL_TEST_KEY, "reranker")
 
 
 
107
  free_text_models = []
108
  free_embedding_models = []
109
 
 
131
  ) as executor:
132
  future_to_model = {
133
  executor.submit(
134
+ test_model_availability,
135
+ FREE_MODEL_TEST_KEY,
136
+ model
137
  ): model for model in embedding_models
138
  }
139
  for future in concurrent.futures.as_completed(future_to_model):