Spaces:
Build error
Build error
updating saving I suppose
Browse files
app.py
CHANGED
|
@@ -220,13 +220,13 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
|
|
| 220 |
depth_mult=hparams.depth_mult,
|
| 221 |
)
|
| 222 |
|
| 223 |
-
config.save_pretrained(
|
| 224 |
|
| 225 |
-
config = EfficientNetConfig.from_pretrained(
|
| 226 |
|
| 227 |
model = EfficientNetPreTrained(config)
|
| 228 |
|
| 229 |
-
pretrained_model = timm.create_model(
|
| 230 |
model.model.load_state_dict(pretrained_model.state_dict())
|
| 231 |
|
| 232 |
# pipeline = pipeline(task="image-classification", model=model_loading_name)
|
|
|
|
| 220 |
depth_mult=hparams.depth_mult,
|
| 221 |
)
|
| 222 |
|
| 223 |
+
config.save_pretrained("%s_planet_detection" % (model_name))
|
| 224 |
|
| 225 |
+
config = EfficientNetConfig.from_pretrained("%s_planet_detection" % (model_name))
|
| 226 |
|
| 227 |
model = EfficientNetPreTrained(config)
|
| 228 |
|
| 229 |
+
pretrained_model = timm.create_model("%s_planet_detection" % (model_name), pretrained=True)
|
| 230 |
model.model.load_state_dict(pretrained_model.state_dict())
|
| 231 |
|
| 232 |
# pipeline = pipeline(task="image-classification", model=model_loading_name)
|