Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -259,18 +259,8 @@ def v1beta3_google_ai(
|
|
259 |
"message": message
|
260 |
}
|
261 |
)
|
262 |
-
except
|
263 |
-
|
264 |
-
status_code=200,
|
265 |
-
detail=CustomErrorResponseModel(detail=[{"status": "False", "randydev": {"message": internal_error}}])
|
266 |
-
)
|
267 |
-
except Exception:
|
268 |
-
raise HTTPException(
|
269 |
-
status_code=200,
|
270 |
-
detail=CustomErrorResponseModel(detail=[{"status": "False", "randydev": {"message": contact_support}}])
|
271 |
-
)
|
272 |
-
# except:
|
273 |
-
# return SuccessResponse(status="False", randydev={"message": internal_error})
|
274 |
|
275 |
@app.post("/UFoP/dalle3xl")
|
276 |
def dalle_3xl(
|
@@ -289,7 +279,7 @@ def dalle_3xl(
|
|
289 |
except requests.exceptions.RequestException:
|
290 |
raise HTTPException(
|
291 |
status_code=500,
|
292 |
-
detail=CustomErrorResponseModel(detail=[{"
|
293 |
)
|
294 |
|
295 |
try:
|
@@ -297,7 +287,7 @@ def dalle_3xl(
|
|
297 |
except Exception:
|
298 |
raise HTTPException(
|
299 |
status_code=500,
|
300 |
-
detail=CustomErrorResponseModel(detail=[{"
|
301 |
)
|
302 |
|
303 |
if encoded_string:
|
|
|
259 |
"message": message
|
260 |
}
|
261 |
)
|
262 |
+
except:
|
263 |
+
return SuccessResponse(status="False", randydev={"message": internal_error})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
@app.post("/UFoP/dalle3xl")
|
266 |
def dalle_3xl(
|
|
|
279 |
except requests.exceptions.RequestException:
|
280 |
raise HTTPException(
|
281 |
status_code=500,
|
282 |
+
detail=CustomErrorResponseModel(detail=[{"Error": internal_error}])
|
283 |
)
|
284 |
|
285 |
try:
|
|
|
287 |
except Exception:
|
288 |
raise HTTPException(
|
289 |
status_code=500,
|
290 |
+
detail=CustomErrorResponseModel(detail=[{"Error": contact_support}])
|
291 |
)
|
292 |
|
293 |
if encoded_string:
|