Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -425,10 +425,10 @@ def get_civitai_safetensors(link):
|
|
| 425 |
if(x.status_code != 200):
|
| 426 |
raise Exception("Invalid CivitAI URL")
|
| 427 |
model_data = x.json()
|
| 428 |
-
if(model_data["nsfw"] == True or model_data["nsfwLevel"] > 20):
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
gr.Warning("The model isn't tagged at CivitAI as a LoRA")
|
| 433 |
raise Exception("The model isn't tagged at CivitAI as a LoRA")
|
| 434 |
model_link_download = None
|
|
|
|
| 425 |
if(x.status_code != 200):
|
| 426 |
raise Exception("Invalid CivitAI URL")
|
| 427 |
model_data = x.json()
|
| 428 |
+
#if(model_data["nsfw"] == True or model_data["nsfwLevel"] > 20):
|
| 429 |
+
# gr.Warning("The model is tagged by CivitAI as adult content and cannot be used in this shared environment.")
|
| 430 |
+
# raise Exception("The model is tagged by CivitAI as adult content and cannot be used in this shared environment.")
|
| 431 |
+
if(model_data["type"] != "LORA"):
|
| 432 |
gr.Warning("The model isn't tagged at CivitAI as a LoRA")
|
| 433 |
raise Exception("The model isn't tagged at CivitAI as a LoRA")
|
| 434 |
model_link_download = None
|