Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -471,6 +471,18 @@ def api_fn(api):
|
|
471 |
except anthropic.AuthenticationError:
|
472 |
gr.Warning("Invalid API!")
|
473 |
valid_api = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
|
475 |
|
476 |
def generate_out(prompt, vp_pos, vp_neg, slider, example_prompt, gallery, num_inference_steps, seed, randomize_seed):
|
|
|
471 |
except anthropic.AuthenticationError:
|
472 |
gr.Warning("Invalid API!")
|
473 |
valid_api = ""
|
474 |
+
|
475 |
+
except anthropic.BadRequestError:
|
476 |
+
gr.Warning("Invalid API!")
|
477 |
+
valid_api = ""
|
478 |
+
|
479 |
+
except anthropic.PermissionDeniedError:
|
480 |
+
gr.Warning("Invalid API!")
|
481 |
+
valid_api = ""
|
482 |
+
|
483 |
+
except anthropic.RateLimitError:
|
484 |
+
gr.Warning("Invalid API!")
|
485 |
+
valid_api = ""
|
486 |
|
487 |
|
488 |
def generate_out(prompt, vp_pos, vp_neg, slider, example_prompt, gallery, num_inference_steps, seed, randomize_seed):
|