Spaces:
Runtime error
Runtime error
Commit
•
f9bd415
1
Parent(s):
5c0b9f1
Update app.py
Browse files
app.py
CHANGED
@@ -419,7 +419,7 @@ def get_civitai_safetensors(link):
|
|
419 |
if(x.status_code != 200):
|
420 |
raise Exception("Invalid CivitAI URL")
|
421 |
model_data = x.json()
|
422 |
-
if(model_data["nsfw"] == True or model_data["nsfwLevel"] >
|
423 |
gr.Warning("The model is tagged by CivitAI as adult content and cannot be used in this shared environment.")
|
424 |
raise Exception("The model is tagged by CivitAI as adult content and cannot be used in this shared environment.")
|
425 |
elif(model_data["type"] != "LORA"):
|
|
|
419 |
if(x.status_code != 200):
|
420 |
raise Exception("Invalid CivitAI URL")
|
421 |
model_data = x.json()
|
422 |
+
if(model_data["nsfw"] == True or model_data["nsfwLevel"] > 20):
|
423 |
gr.Warning("The model is tagged by CivitAI as adult content and cannot be used in this shared environment.")
|
424 |
raise Exception("The model is tagged by CivitAI as adult content and cannot be used in this shared environment.")
|
425 |
elif(model_data["type"] != "LORA"):
|