Spaces:
Sleeping
Sleeping
Add application file
Browse files
app.py
CHANGED
@@ -18,12 +18,12 @@ import matplotlib.cm as cm
|
|
18 |
|
19 |
|
20 |
models_links = {
|
21 |
-
'
|
22 |
|
23 |
model_weights = {
|
24 |
}
|
25 |
|
26 |
-
model_last_convolutional_layer = {'
|
27 |
|
28 |
classes = ['Alveralhao',
|
29 |
'Arinto do Douro',
|
@@ -180,6 +180,8 @@ def infer(model_name, input_image):
|
|
180 |
result = {}
|
181 |
|
182 |
|
|
|
|
|
183 |
for i in range(len(classes)):
|
184 |
result[classes[i]] = float(predictions[i])
|
185 |
#predictions = np.argmax(predictions) # , axis=2
|
|
|
18 |
|
19 |
|
20 |
models_links = {
|
21 |
+
'convnext':'https://huggingface.co/gabri14el/grapevine_classification/raw/main/experimentos/fine-tuning/huge_classifier_20varieties.h5'}
|
22 |
|
23 |
model_weights = {
|
24 |
}
|
25 |
|
26 |
+
model_last_convolutional_layer = {'convnext': 'convnext_large_stage_3_block_2_depthwise_conv'}
|
27 |
|
28 |
classes = ['Alveralhao',
|
29 |
'Arinto do Douro',
|
|
|
180 |
result = {}
|
181 |
|
182 |
|
183 |
+
|
184 |
+
|
185 |
for i in range(len(classes)):
|
186 |
result[classes[i]] = float(predictions[i])
|
187 |
#predictions = np.argmax(predictions) # , axis=2
|