Spaces:
Sleeping
Sleeping
un-index
commited on
Commit
·
552084d
1
Parent(s):
60b60b7
app.py
CHANGED
|
@@ -104,6 +104,7 @@ def f(context, temperature, top_p, max_length, model_idx):
|
|
| 104 |
# generated_text = json.loads(response.content.decode("utf-8"))[0]['generated_text']
|
| 105 |
return generated_text
|
| 106 |
|
|
|
|
| 107 |
if not secondary_gpt_j_api_up:
|
| 108 |
return "ERR: both GPT-J-6B APIs are down, please try again later (will use a third fallback in the future)"
|
| 109 |
|
|
|
|
| 104 |
# generated_text = json.loads(response.content.decode("utf-8"))[0]['generated_text']
|
| 105 |
return generated_text
|
| 106 |
|
| 107 |
+
# use secondary gpt-j-6B api, as the main one is down
|
| 108 |
if not secondary_gpt_j_api_up:
|
| 109 |
return "ERR: both GPT-J-6B APIs are down, please try again later (will use a third fallback in the future)"
|
| 110 |
|