yangtb24 commited on
Commit
00407d4
·
verified ·
1 Parent(s): 8ea742a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -81,7 +81,7 @@ def test_model_availability(api_key, model_name):
81
  "max_tokens": 5,
82
  "stream": False
83
  },
84
- timeout=10
85
  )
86
  if response.status_code == 429 or response.status_code == 200:
87
  return True
@@ -126,7 +126,7 @@ def refresh_models():
126
  embedding_models = [model for model in embedding_models if model not in ban_models]
127
 
128
  with concurrent.futures.ThreadPoolExecutor(
129
- max_workers=10
130
  ) as executor:
131
  future_to_model = {
132
  executor.submit(
@@ -145,7 +145,7 @@ def refresh_models():
145
  logging.error(f"模型 {model} 测试生成异常: {exc}")
146
 
147
  with concurrent.futures.ThreadPoolExecutor(
148
- max_workers=10
149
  ) as executor:
150
  future_to_model = {
151
  executor.submit(
 
81
  "max_tokens": 5,
82
  "stream": False
83
  },
84
+ timeout=5
85
  )
86
  if response.status_code == 429 or response.status_code == 200:
87
  return True
 
126
  embedding_models = [model for model in embedding_models if model not in ban_models]
127
 
128
  with concurrent.futures.ThreadPoolExecutor(
129
+ max_workers=100
130
  ) as executor:
131
  future_to_model = {
132
  executor.submit(
 
145
  logging.error(f"模型 {model} 测试生成异常: {exc}")
146
 
147
  with concurrent.futures.ThreadPoolExecutor(
148
+ max_workers=100
149
  ) as executor:
150
  future_to_model = {
151
  executor.submit(