Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -114,8 +114,18 @@ app = FastAPI(
|
|
| 114 |
timeout = 100
|
| 115 |
contact_support = """
|
| 116 |
We are aware that this service is currently offline. This seems to be caused by the API
|
| 117 |
-
We are investigating and doing our best to get things back online as soon as possible.
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
"""
|
| 120 |
|
| 121 |
def validate_api_key(api_key: str = Header(...)):
|
|
@@ -250,7 +260,7 @@ def v1beta3_google_ai(
|
|
| 250 |
}
|
| 251 |
)
|
| 252 |
except:
|
| 253 |
-
return {"status": "false", "message": "
|
| 254 |
|
| 255 |
@app.post("/UFoP/dalle3xl")
|
| 256 |
def dalle_3xl(
|
|
@@ -277,7 +287,7 @@ def dalle_3xl(
|
|
| 277 |
except Exception:
|
| 278 |
raise HTTPException(
|
| 279 |
status_code=500,
|
| 280 |
-
detail=CustomErrorResponseModel(detail=[{}])
|
| 281 |
)
|
| 282 |
|
| 283 |
if encoded_string:
|
|
|
|
| 114 |
timeout = 100
|
| 115 |
contact_support = """
|
| 116 |
We are aware that this service is currently offline. This seems to be caused by the API
|
| 117 |
+
We are investigating and doing our best to get things back online as soon as possible.
|
| 118 |
+
Thank you for your patience
|
| 119 |
+
|
| 120 |
+
~ Contact Support @SoulOfSukuna
|
| 121 |
+
"""
|
| 122 |
+
|
| 123 |
+
internal_error = """
|
| 124 |
+
There has been an Internal error. We are aware of this error and notice that it can be
|
| 125 |
+
caused by your search terms being to explict, too confusing, or it can be caused by the API.
|
| 126 |
+
Please modify your search terms and/or try again later thank you for your understanding.
|
| 127 |
+
|
| 128 |
+
~ 🌀ʊʄ⊕ք🌀 Team
|
| 129 |
"""
|
| 130 |
|
| 131 |
def validate_api_key(api_key: str = Header(...)):
|
|
|
|
| 260 |
}
|
| 261 |
)
|
| 262 |
except:
|
| 263 |
+
return {"status": "false", "message": f"{internal_error}"}
|
| 264 |
|
| 265 |
@app.post("/UFoP/dalle3xl")
|
| 266 |
def dalle_3xl(
|
|
|
|
| 287 |
except Exception:
|
| 288 |
raise HTTPException(
|
| 289 |
status_code=500,
|
| 290 |
+
detail=CustomErrorResponseModel(detail=[{"Error": f"{internal_error}"}])
|
| 291 |
)
|
| 292 |
|
| 293 |
if encoded_string:
|