Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,6 @@ mmodels = {
|
|
30 |
"Redmond SDXL": "artificialguybr/LogoRedmond-LogoLoraForSDXL-V2",
|
31 |
"Arcane": "nitrosocke/Arcane-Diffusion"
|
32 |
}
|
33 |
-
timeout = 255
|
34 |
# PLEASE ❤ like ❤ this space. Please like me. I am 12 years old, one of my projects is: https://ai-hub.rf.gd . I live in Russia, I don't know English very well. Therefore, I apologize that there is only Russian here, but I think it will not be difficult to translate all this. (For example, using gpt)
|
35 |
|
36 |
def query(prompt, is_negative=False, gpt=True, model="DALL-E 3 XL", steps=30, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024):
|
@@ -128,6 +127,9 @@ def query(prompt, is_negative=False, gpt=True, model="DALL-E 3 XL", steps=30, cf
|
|
128 |
if response.status_code == 503:
|
129 |
raise gr.Error(f"😭 Прости... Но сервера перегружены...")
|
130 |
return None
|
|
|
|
|
|
|
131 |
raise gr.Error(f"😫 Прости, произошла ошибочка.. Попробуй ещё раз позже.")
|
132 |
return None
|
133 |
|
|
|
30 |
"Redmond SDXL": "artificialguybr/LogoRedmond-LogoLoraForSDXL-V2",
|
31 |
"Arcane": "nitrosocke/Arcane-Diffusion"
|
32 |
}
|
|
|
33 |
# PLEASE ❤ like ❤ this space. Please like me. I am 12 years old, one of my projects is: https://ai-hub.rf.gd . I live in Russia, I don't know English very well. Therefore, I apologize that there is only Russian here, but I think it will not be difficult to translate all this. (For example, using gpt)
|
34 |
|
35 |
def query(prompt, is_negative=False, gpt=True, model="DALL-E 3 XL", steps=30, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024):
|
|
|
127 |
if response.status_code == 503:
|
128 |
raise gr.Error(f"😭 Прости... Но сервера перегружены...")
|
129 |
return None
|
130 |
+
if response.status_code == 500:
|
131 |
+
raise gr.Error(f"🙄 Опять эти сервера сбоят, прости..")
|
132 |
+
return None
|
133 |
raise gr.Error(f"😫 Прости, произошла ошибочка.. Попробуй ещё раз позже.")
|
134 |
return None
|
135 |
|