Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,8 @@ class PipelineManager:
|
|
53 |
try:
|
54 |
logger.info("Loading NSFW detector...")
|
55 |
self.nsfw_detector_processor = CLIPProcessor.from_pretrained(NSFW_MODEL_ID)
|
56 |
-
|
|
|
57 |
|
58 |
if DEVICE == "cuda":
|
59 |
self.nsfw_detector_model = self.nsfw_detector_model.to(DEVICE)
|
|
|
53 |
try:
|
54 |
logger.info("Loading NSFW detector...")
|
55 |
self.nsfw_detector_processor = CLIPProcessor.from_pretrained(NSFW_MODEL_ID)
|
56 |
+
# Add use_safetensors=True to the CLIPModel.from_pretrained call
|
57 |
+
self.nsfw_detector_model = CLIPModel.from_pretrained(NSFW_MODEL_ID, use_safetensors=True)
|
58 |
|
59 |
if DEVICE == "cuda":
|
60 |
self.nsfw_detector_model = self.nsfw_detector_model.to(DEVICE)
|