Spaces:
Running
Running
Commit
·
20fe77c
1
Parent(s):
6ade478
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,6 +52,7 @@ def mmlu_display_question_answer(question, cot, request: gr.Request):
|
|
| 52 |
|
| 53 |
def warmup(list_model, model_inference_endpoints=inference_endpoint):
|
| 54 |
for model in list_model:
|
|
|
|
| 55 |
API_URL = model_inference_endpoints[model]["API_URL"]
|
| 56 |
headers = model_inference_endpoints[model]["headers"]
|
| 57 |
headers["Authorization"] += HF_TOKEN
|
|
@@ -63,7 +64,7 @@ def warmup(list_model, model_inference_endpoints=inference_endpoint):
|
|
| 63 |
"inputs": "Hello. "
|
| 64 |
})
|
| 65 |
|
| 66 |
-
time.sleep(
|
| 67 |
return {
|
| 68 |
model_list: gr.update(visible=False),
|
| 69 |
options: gr.update(visible=True),
|
|
|
|
| 52 |
|
| 53 |
def warmup(list_model, model_inference_endpoints=inference_endpoint):
|
| 54 |
for model in list_model:
|
| 55 |
+
model = model.lower()
|
| 56 |
API_URL = model_inference_endpoints[model]["API_URL"]
|
| 57 |
headers = model_inference_endpoints[model]["headers"]
|
| 58 |
headers["Authorization"] += HF_TOKEN
|
|
|
|
| 64 |
"inputs": "Hello. "
|
| 65 |
})
|
| 66 |
|
| 67 |
+
time.sleep(300)
|
| 68 |
return {
|
| 69 |
model_list: gr.update(visible=False),
|
| 70 |
options: gr.update(visible=True),
|