Spaces:
Running
Running
Commit
·
a05d03c
1
Parent(s):
0072900
Update app.py
Browse files
app.py
CHANGED
@@ -60,19 +60,21 @@ def warmup(model_list=warmup_test, model_inference_endpoints=inference_endpoint)
|
|
60 |
response = requests.post(API_URL, headers=headers, json=payload)
|
61 |
return response.json()
|
62 |
try:
|
63 |
-
query({
|
64 |
"inputs": "Hello."
|
65 |
})
|
66 |
except:
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
76 |
|
77 |
def inference(model_list, question, API_KEY, cot):
|
78 |
if len(model_list) != 3:
|
|
|
60 |
response = requests.post(API_URL, headers=headers, json=payload)
|
61 |
return response.json()
|
62 |
try:
|
63 |
+
_ = query({
|
64 |
"inputs": "Hello."
|
65 |
})
|
66 |
except:
|
67 |
+
if model == model_list[-1]:
|
68 |
+
time.sleep(10)
|
69 |
+
return {
|
70 |
+
options: gr.update(visible=True),
|
71 |
+
inputbox: gr.update(visible=True),
|
72 |
+
submit: gr.update(visible=True),
|
73 |
+
warmup_button: gr.update(visible=False),
|
74 |
+
welcome_message: gr.update(visible=True)
|
75 |
+
}
|
76 |
+
else:
|
77 |
+
continue
|
78 |
|
79 |
def inference(model_list, question, API_KEY, cot):
|
80 |
if len(model_list) != 3:
|