- entklei.py +3 -2
entklei.py
CHANGED
@@ -18,6 +18,8 @@ import os
|
|
18 |
import pydash as _
|
19 |
import boto3
|
20 |
|
|
|
|
|
21 |
age_detection_model = ViTForImageClassification.from_pretrained(
|
22 |
'nateraw/vit-age-classifier')
|
23 |
age_detection_transforms = ViTFeatureExtractor.from_pretrained(
|
@@ -131,8 +133,7 @@ base_pipe.safety_checker = None
|
|
131 |
|
132 |
pipe_with_tit_slider = _.clone_deep(base_pipe)
|
133 |
|
134 |
-
pipe_with_tit_slider.load_lora_weights(os.path.join(
|
135 |
-
'path', "."), "models", "breastsizeslideroffset.safetensors"), weight_name="breastsizeslideroffset.safetensors", adapter_name="breastsizeslideroffset")
|
136 |
|
137 |
pipe_with_small_tits = _.clone_deep(pipe_with_tit_slider)
|
138 |
pipe_with_small_tits.set_adapters("breastsizeslideroffset", adapter_weights=[-0.8])
|
|
|
18 |
import pydash as _
|
19 |
import boto3
|
20 |
|
21 |
+
is_production = True
|
22 |
+
|
23 |
age_detection_model = ViTForImageClassification.from_pretrained(
|
24 |
'nateraw/vit-age-classifier')
|
25 |
age_detection_transforms = ViTFeatureExtractor.from_pretrained(
|
|
|
133 |
|
134 |
pipe_with_tit_slider = _.clone_deep(base_pipe)
|
135 |
|
136 |
+
pipe_with_tit_slider.load_lora_weights(os.path.join("/repository" if is_production else ".", "models", "breastsizeslideroffset.safetensors"), weight_name="breastsizeslideroffset.safetensors", adapter_name="breastsizeslideroffset")
|
|
|
137 |
|
138 |
pipe_with_small_tits = _.clone_deep(pipe_with_tit_slider)
|
139 |
pipe_with_small_tits.set_adapters("breastsizeslideroffset", adapter_weights=[-0.8])
|