From 91b0718fc5f390b67f0615a5c839d9f2227f1adf Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 20 Mar 2023 18:05:43 +0800 Subject: [PATCH] up --- predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/predict.py b/predict.py index da8b887..9a6fffb 100644 --- a/predict.py +++ b/predict.py @@ -89,7 +89,7 @@ def predict(inputs, top_p, temperature, chatbot=[], history=[], system_prompt='' response = requests.post(API_URL, headers=headers, proxies=proxies, json=payload, stream=True, timeout=15) except: - chatbot.append(('', 'Requests Timeout, Network Error.')) + chatbot[-1] = ((chatbot[-1][0], 'Requests Timeout, Network Error.')) yield chatbot, history, "Requests Timeout" raise TimeoutError