Spaces:
Sleeping
Sleeping
gmarti
commited on
Commit
·
e58d561
1
Parent(s):
bb768ba
json changes 3
Browse files- PROVIDERS.json +33 -33
- app.py +30 -9
PROVIDERS.json
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
},
|
22 |
{
|
23 |
"name": "NUEVO ARPON SA",
|
24 |
-
"price": "$
|
25 |
"provincias": [
|
26 |
"Provincia de Córdoba",
|
27 |
"Provincia de San Juan",
|
@@ -38,7 +38,7 @@
|
|
38 |
},
|
39 |
{
|
40 |
"name": "EXTER NEUQUEN S.R.L.",
|
41 |
-
"price": "$
|
42 |
"provincias": [
|
43 |
"Provincia del Neuquén",
|
44 |
"Provincia de Río Negro",
|
@@ -52,7 +52,7 @@
|
|
52 |
},
|
53 |
{
|
54 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
55 |
-
"price": "$
|
56 |
"provincias": [
|
57 |
"Provincia del Chaco",
|
58 |
"Provincia de Corrientes",
|
@@ -71,7 +71,7 @@
|
|
71 |
"suppliers": [
|
72 |
{
|
73 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
74 |
-
"price": "$
|
75 |
"provincias": [
|
76 |
"Provincia de Buenos Aires",
|
77 |
"Provincia de La Pampa",
|
@@ -103,7 +103,7 @@
|
|
103 |
},
|
104 |
{
|
105 |
"name": "EXTER NEUQUEN S.R.L.",
|
106 |
-
"price": "$
|
107 |
"provincias": [
|
108 |
"Provincia del Neuquén",
|
109 |
"Provincia de Río Negro",
|
@@ -123,7 +123,7 @@
|
|
123 |
"suppliers": [
|
124 |
{
|
125 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
126 |
-
"price": "$
|
127 |
"provincias": [
|
128 |
"Provincia de Buenos Aires",
|
129 |
"Provincia de La Pampa",
|
@@ -138,7 +138,7 @@
|
|
138 |
},
|
139 |
{
|
140 |
"name": "NUEVO ARPON SA",
|
141 |
-
"price": "$
|
142 |
"provincias": [
|
143 |
"Provincia de Córdoba",
|
144 |
"Provincia de San Juan",
|
@@ -175,7 +175,7 @@
|
|
175 |
"suppliers": [
|
176 |
{
|
177 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
178 |
-
"price": "$
|
179 |
"provincias": [
|
180 |
"Provincia de Buenos Aires",
|
181 |
"Provincia de La Pampa",
|
@@ -190,7 +190,7 @@
|
|
190 |
},
|
191 |
{
|
192 |
"name": "NUEVO ARPON SA",
|
193 |
-
"price": "$
|
194 |
"provincias": [
|
195 |
"Provincia de Córdoba",
|
196 |
"Provincia de San Juan",
|
@@ -207,7 +207,7 @@
|
|
207 |
},
|
208 |
{
|
209 |
"name": "EXTER NEUQUEN S.R.L.",
|
210 |
-
"price": "$
|
211 |
"provincias": [
|
212 |
"Provincia del Neuquén",
|
213 |
"Provincia de Río Negro",
|
@@ -240,7 +240,7 @@
|
|
240 |
"suppliers": [
|
241 |
{
|
242 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
243 |
-
"price": "$
|
244 |
"provincias": [
|
245 |
"Provincia de Buenos Aires",
|
246 |
"Provincia de La Pampa",
|
@@ -272,7 +272,7 @@
|
|
272 |
},
|
273 |
{
|
274 |
"name": "EXTER NEUQUEN S.R.L.",
|
275 |
-
"price": "$
|
276 |
"provincias": [
|
277 |
"Provincia del Neuquén",
|
278 |
"Provincia de Río Negro",
|
@@ -286,7 +286,7 @@
|
|
286 |
},
|
287 |
{
|
288 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
289 |
-
"price": "$
|
290 |
"provincias": [
|
291 |
"Provincia del Chaco",
|
292 |
"Provincia de Corrientes",
|
@@ -305,7 +305,7 @@
|
|
305 |
"suppliers": [
|
306 |
{
|
307 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
308 |
-
"price": "$5.
|
309 |
"provincias": [
|
310 |
"Provincia de Buenos Aires",
|
311 |
"Provincia de La Pampa",
|
@@ -320,7 +320,7 @@
|
|
320 |
},
|
321 |
{
|
322 |
"name": "NUEVO ARPON SA",
|
323 |
-
"price": "$
|
324 |
"provincias": [
|
325 |
"Provincia de Córdoba",
|
326 |
"Provincia de San Juan",
|
@@ -337,7 +337,7 @@
|
|
337 |
},
|
338 |
{
|
339 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
340 |
-
"price": "$
|
341 |
"provincias": [
|
342 |
"Provincia del Chaco",
|
343 |
"Provincia de Corrientes",
|
@@ -350,7 +350,7 @@
|
|
350 |
},
|
351 |
{
|
352 |
"name": "EXTER NEUQUEN S.R.L.",
|
353 |
-
"price": "$
|
354 |
"provincias": [
|
355 |
"Provincia del Neuquén",
|
356 |
"Provincia de Río Negro",
|
@@ -370,7 +370,7 @@
|
|
370 |
"suppliers": [
|
371 |
{
|
372 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
373 |
-
"price": "$
|
374 |
"provincias": [
|
375 |
"Provincia de Buenos Aires",
|
376 |
"Provincia de La Pampa",
|
@@ -402,7 +402,7 @@
|
|
402 |
},
|
403 |
{
|
404 |
"name": "EXTER NEUQUEN S.R.L.",
|
405 |
-
"price": "$
|
406 |
"provincias": [
|
407 |
"Provincia del Neuquén",
|
408 |
"Provincia de Río Negro",
|
@@ -422,7 +422,7 @@
|
|
422 |
"suppliers": [
|
423 |
{
|
424 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
425 |
-
"price": "$
|
426 |
"provincias": [
|
427 |
"Provincia de Buenos Aires",
|
428 |
"Provincia de La Pampa",
|
@@ -437,7 +437,7 @@
|
|
437 |
},
|
438 |
{
|
439 |
"name": "NUEVO ARPON SA",
|
440 |
-
"price": "$
|
441 |
"provincias": [
|
442 |
"Provincia de Córdoba",
|
443 |
"Provincia de San Juan",
|
@@ -454,7 +454,7 @@
|
|
454 |
},
|
455 |
{
|
456 |
"name": "EXTER NEUQUEN S.R.L.",
|
457 |
-
"price": "$
|
458 |
"provincias": [
|
459 |
"Provincia del Neuquén",
|
460 |
"Provincia de Río Negro",
|
@@ -474,7 +474,7 @@
|
|
474 |
"suppliers": [
|
475 |
{
|
476 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
477 |
-
"price": "$
|
478 |
"provincias": [
|
479 |
"Provincia de Buenos Aires",
|
480 |
"Provincia de La Pampa",
|
@@ -489,7 +489,7 @@
|
|
489 |
},
|
490 |
{
|
491 |
"name": "NUEVO ARPON SA",
|
492 |
-
"price": "$
|
493 |
"provincias": [
|
494 |
"Provincia de Córdoba",
|
495 |
"Provincia de San Juan",
|
@@ -520,7 +520,7 @@
|
|
520 |
},
|
521 |
{
|
522 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
523 |
-
"price": "$
|
524 |
"provincias": [
|
525 |
"Provincia del Chaco",
|
526 |
"Provincia de Corrientes",
|
@@ -539,7 +539,7 @@
|
|
539 |
"suppliers": [
|
540 |
{
|
541 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
542 |
-
"price": "$
|
543 |
"provincias": [
|
544 |
"Provincia de Buenos Aires",
|
545 |
"Provincia de La Pampa",
|
@@ -571,7 +571,7 @@
|
|
571 |
},
|
572 |
{
|
573 |
"name": "EXTER NEUQUEN S.R.L.",
|
574 |
-
"price": "$
|
575 |
"provincias": [
|
576 |
"Provincia del Neuquén",
|
577 |
"Provincia de Río Negro",
|
@@ -591,7 +591,7 @@
|
|
591 |
"suppliers": [
|
592 |
{
|
593 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
594 |
-
"price": "$
|
595 |
"provincias": [
|
596 |
"Provincia de Buenos Aires",
|
597 |
"Provincia de La Pampa",
|
@@ -606,7 +606,7 @@
|
|
606 |
},
|
607 |
{
|
608 |
"name": "NUEVO ARPON SA",
|
609 |
-
"price": "$
|
610 |
"provincias": [
|
611 |
"Provincia de Córdoba",
|
612 |
"Provincia de San Juan",
|
@@ -623,7 +623,7 @@
|
|
623 |
},
|
624 |
{
|
625 |
"name": "EXTER NEUQUEN S.R.L.",
|
626 |
-
"price": "$
|
627 |
"provincias": [
|
628 |
"Provincia del Neuquén",
|
629 |
"Provincia de Río Negro",
|
@@ -643,7 +643,7 @@
|
|
643 |
"suppliers": [
|
644 |
{
|
645 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
646 |
-
"price": "$
|
647 |
"provincias": [
|
648 |
"Provincia de Buenos Aires",
|
649 |
"Provincia de La Pampa",
|
@@ -658,7 +658,7 @@
|
|
658 |
},
|
659 |
{
|
660 |
"name": "NUEVO ARPON SA",
|
661 |
-
"price": "$
|
662 |
"provincias": [
|
663 |
"Provincia de Córdoba",
|
664 |
"Provincia de San Juan",
|
@@ -675,7 +675,7 @@
|
|
675 |
},
|
676 |
{
|
677 |
"name": "EXTER NEUQUEN S.R.L.",
|
678 |
-
"price": "$
|
679 |
"provincias": [
|
680 |
"Provincia del Neuquén",
|
681 |
"Provincia de Río Negro",
|
|
|
21 |
},
|
22 |
{
|
23 |
"name": "NUEVO ARPON SA",
|
24 |
+
"price": "$5.200",
|
25 |
"provincias": [
|
26 |
"Provincia de Córdoba",
|
27 |
"Provincia de San Juan",
|
|
|
38 |
},
|
39 |
{
|
40 |
"name": "EXTER NEUQUEN S.R.L.",
|
41 |
+
"price": "$5.200",
|
42 |
"provincias": [
|
43 |
"Provincia del Neuquén",
|
44 |
"Provincia de Río Negro",
|
|
|
52 |
},
|
53 |
{
|
54 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
55 |
+
"price": "$5.200",
|
56 |
"provincias": [
|
57 |
"Provincia del Chaco",
|
58 |
"Provincia de Corrientes",
|
|
|
71 |
"suppliers": [
|
72 |
{
|
73 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
74 |
+
"price": "$7.300",
|
75 |
"provincias": [
|
76 |
"Provincia de Buenos Aires",
|
77 |
"Provincia de La Pampa",
|
|
|
103 |
},
|
104 |
{
|
105 |
"name": "EXTER NEUQUEN S.R.L.",
|
106 |
+
"price": "$7.350",
|
107 |
"provincias": [
|
108 |
"Provincia del Neuquén",
|
109 |
"Provincia de Río Negro",
|
|
|
123 |
"suppliers": [
|
124 |
{
|
125 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
126 |
+
"price": "$6.225",
|
127 |
"provincias": [
|
128 |
"Provincia de Buenos Aires",
|
129 |
"Provincia de La Pampa",
|
|
|
138 |
},
|
139 |
{
|
140 |
"name": "NUEVO ARPON SA",
|
141 |
+
"price": "$6.300",
|
142 |
"provincias": [
|
143 |
"Provincia de Córdoba",
|
144 |
"Provincia de San Juan",
|
|
|
175 |
"suppliers": [
|
176 |
{
|
177 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
178 |
+
"price": "$9.100",
|
179 |
"provincias": [
|
180 |
"Provincia de Buenos Aires",
|
181 |
"Provincia de La Pampa",
|
|
|
190 |
},
|
191 |
{
|
192 |
"name": "NUEVO ARPON SA",
|
193 |
+
"price": "$9.100",
|
194 |
"provincias": [
|
195 |
"Provincia de Córdoba",
|
196 |
"Provincia de San Juan",
|
|
|
207 |
},
|
208 |
{
|
209 |
"name": "EXTER NEUQUEN S.R.L.",
|
210 |
+
"price": "$9.400",
|
211 |
"provincias": [
|
212 |
"Provincia del Neuquén",
|
213 |
"Provincia de Río Negro",
|
|
|
240 |
"suppliers": [
|
241 |
{
|
242 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
243 |
+
"price": "$7.320",
|
244 |
"provincias": [
|
245 |
"Provincia de Buenos Aires",
|
246 |
"Provincia de La Pampa",
|
|
|
272 |
},
|
273 |
{
|
274 |
"name": "EXTER NEUQUEN S.R.L.",
|
275 |
+
"price": "$7.300",
|
276 |
"provincias": [
|
277 |
"Provincia del Neuquén",
|
278 |
"Provincia de Río Negro",
|
|
|
286 |
},
|
287 |
{
|
288 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
289 |
+
"price": "$7.300",
|
290 |
"provincias": [
|
291 |
"Provincia del Chaco",
|
292 |
"Provincia de Corrientes",
|
|
|
305 |
"suppliers": [
|
306 |
{
|
307 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
308 |
+
"price": "$5.400",
|
309 |
"provincias": [
|
310 |
"Provincia de Buenos Aires",
|
311 |
"Provincia de La Pampa",
|
|
|
320 |
},
|
321 |
{
|
322 |
"name": "NUEVO ARPON SA",
|
323 |
+
"price": "$5.400",
|
324 |
"provincias": [
|
325 |
"Provincia de Córdoba",
|
326 |
"Provincia de San Juan",
|
|
|
337 |
},
|
338 |
{
|
339 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
340 |
+
"price": "$5.500",
|
341 |
"provincias": [
|
342 |
"Provincia del Chaco",
|
343 |
"Provincia de Corrientes",
|
|
|
350 |
},
|
351 |
{
|
352 |
"name": "EXTER NEUQUEN S.R.L.",
|
353 |
+
"price": "$5.400",
|
354 |
"provincias": [
|
355 |
"Provincia del Neuquén",
|
356 |
"Provincia de Río Negro",
|
|
|
370 |
"suppliers": [
|
371 |
{
|
372 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
373 |
+
"price": "$7.100",
|
374 |
"provincias": [
|
375 |
"Provincia de Buenos Aires",
|
376 |
"Provincia de La Pampa",
|
|
|
402 |
},
|
403 |
{
|
404 |
"name": "EXTER NEUQUEN S.R.L.",
|
405 |
+
"price": "$7.100",
|
406 |
"provincias": [
|
407 |
"Provincia del Neuquén",
|
408 |
"Provincia de Río Negro",
|
|
|
422 |
"suppliers": [
|
423 |
{
|
424 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
425 |
+
"price": "$8.200",
|
426 |
"provincias": [
|
427 |
"Provincia de Buenos Aires",
|
428 |
"Provincia de La Pampa",
|
|
|
437 |
},
|
438 |
{
|
439 |
"name": "NUEVO ARPON SA",
|
440 |
+
"price": "$8.200",
|
441 |
"provincias": [
|
442 |
"Provincia de Córdoba",
|
443 |
"Provincia de San Juan",
|
|
|
454 |
},
|
455 |
{
|
456 |
"name": "EXTER NEUQUEN S.R.L.",
|
457 |
+
"price": "$8.200",
|
458 |
"provincias": [
|
459 |
"Provincia del Neuquén",
|
460 |
"Provincia de Río Negro",
|
|
|
474 |
"suppliers": [
|
475 |
{
|
476 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
477 |
+
"price": "$6.200",
|
478 |
"provincias": [
|
479 |
"Provincia de Buenos Aires",
|
480 |
"Provincia de La Pampa",
|
|
|
489 |
},
|
490 |
{
|
491 |
"name": "NUEVO ARPON SA",
|
492 |
+
"price": "$6.200",
|
493 |
"provincias": [
|
494 |
"Provincia de Córdoba",
|
495 |
"Provincia de San Juan",
|
|
|
520 |
},
|
521 |
{
|
522 |
"name": "CAVIGLIA Y TELLARINI S.A.",
|
523 |
+
"price": "$6.200",
|
524 |
"provincias": [
|
525 |
"Provincia del Chaco",
|
526 |
"Provincia de Corrientes",
|
|
|
539 |
"suppliers": [
|
540 |
{
|
541 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
542 |
+
"price": "$7.300",
|
543 |
"provincias": [
|
544 |
"Provincia de Buenos Aires",
|
545 |
"Provincia de La Pampa",
|
|
|
571 |
},
|
572 |
{
|
573 |
"name": "EXTER NEUQUEN S.R.L.",
|
574 |
+
"price": "$7.300",
|
575 |
"provincias": [
|
576 |
"Provincia del Neuquén",
|
577 |
"Provincia de Río Negro",
|
|
|
591 |
"suppliers": [
|
592 |
{
|
593 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
594 |
+
"price": "$4.900",
|
595 |
"provincias": [
|
596 |
"Provincia de Buenos Aires",
|
597 |
"Provincia de La Pampa",
|
|
|
606 |
},
|
607 |
{
|
608 |
"name": "NUEVO ARPON SA",
|
609 |
+
"price": "$4.900",
|
610 |
"provincias": [
|
611 |
"Provincia de Córdoba",
|
612 |
"Provincia de San Juan",
|
|
|
623 |
},
|
624 |
{
|
625 |
"name": "EXTER NEUQUEN S.R.L.",
|
626 |
+
"price": "$4.900",
|
627 |
"provincias": [
|
628 |
"Provincia del Neuquén",
|
629 |
"Provincia de Río Negro",
|
|
|
643 |
"suppliers": [
|
644 |
{
|
645 |
"name": "LA CASA DE LOS INSECTICIDAS/VALLS",
|
646 |
+
"price": "$4.495",
|
647 |
"provincias": [
|
648 |
"Provincia de Buenos Aires",
|
649 |
"Provincia de La Pampa",
|
|
|
658 |
},
|
659 |
{
|
660 |
"name": "NUEVO ARPON SA",
|
661 |
+
"price": "$4.550",
|
662 |
"provincias": [
|
663 |
"Provincia de Córdoba",
|
664 |
"Provincia de San Juan",
|
|
|
675 |
},
|
676 |
{
|
677 |
"name": "EXTER NEUQUEN S.R.L.",
|
678 |
+
"price": "$4.500",
|
679 |
"provincias": [
|
680 |
"Provincia del Neuquén",
|
681 |
"Provincia de Río Negro",
|
app.py
CHANGED
@@ -22,6 +22,24 @@ with open("WEEDS_JSON.json", "r") as f:
|
|
22 |
with open("PROVIDERS.json", "r") as f:
|
23 |
providers = json.load(f)
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
# %% ../weed_classifier.ipynb 3
|
26 |
labels = learn.dls.vocab
|
27 |
|
@@ -55,7 +73,7 @@ def display_output(weed_name, recommendations, crop, area, state, location):
|
|
55 |
|
56 |
# Añadir recomendaciones de productos
|
57 |
# Añadir recomendaciones de productos
|
58 |
-
output_html
|
59 |
output_list = []
|
60 |
for product in products:
|
61 |
if (state in product["crop_stage"] or state=="ambos") and (crop in product["crop_type"] or crop=="Otro"):
|
@@ -123,9 +141,11 @@ def display_output(weed_name, recommendations, crop, area, state, location):
|
|
123 |
<a href='{product_url}' target='_blank'>Más info</a>
|
124 |
</div>
|
125 |
<hr width='100%' >
|
|
|
126 |
|
127 |
"""
|
128 |
output_list.append(card)
|
|
|
129 |
|
130 |
if not output_list:
|
131 |
output_html += f"<p>No hay productos disponibles para este tipo de maleza actualmente.</p>"
|
@@ -140,7 +160,7 @@ def display_output(weed_name, recommendations, crop, area, state, location):
|
|
140 |
# %% ../weed_classifier.ipynb 5
|
141 |
article = """<div><p style="text-align:center">La intuitiva interfaz presenta información detallada sobre los herbicidas, destacando sus características, beneficios y aplicaciones recomendadas. Mantenemos actualizada nuestra base de datos con los últimos avances en la protección de cultivos para ofrecerte la información más actualizada.</p>
|
142 |
<p style="text-align:center">Esta herramienta no solo simplifica la toma de decisiones, sino que también fomenta una gestión más sostenible de los cultivos, alineándose con las mejores prácticas agrícolas y el cuidado responsable del medio ambiente.</p>
|
143 |
-
<p>Este modelo se entrenó con un conjunto de datos que contiene 5.539 imágenes de plántulas de cultivos y malas hierbas. Las imágenes se agrupan en 12 clases. Estas clases representan especies de plantas comunes en la agricultura danesa en distintas fases de crecimiento. Se ajustó un modelo ResNet34 preentrenado utilizando la biblioteca de visión fastai. La tasa de error alcanzada en el conjunto de datos de validación es del 2,5% tras 4 épocas. </p>
|
144 |
<p style='text-align: center;padding:1rem;display: flex; justify-content:center;align-items: center;'><a href='https://sciling.com' target='_blank'><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ8AAABECAYAAABebDjMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bW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CXi68cODlUugrcVl+w3BnCVsBm1DuaW8BTrD1aWA6cKcv5o1kwG81/IzG3Wy7NVLoU3B1IGvUsNx2wEwp9DnGqss7+bEXrsA85BlWf+AeKfQwY1WewsysjMFlo25Qge3S+A7LtwG3eRX7j+ESFLbBpWhvhfN9LVzJifB/vo0LRPfgjjweB+7v/GSEu678jQ7qLV6jsj0QtQellk9i+n8VnXpqYZaMagAAAABJRU5ErkJggg==" width="150px"></a></p>
|
145 |
</div>"""
|
146 |
|
@@ -172,23 +192,22 @@ theme = gr.themes.Monochrome(primary_hue="blue").set(
|
|
172 |
)
|
173 |
|
174 |
|
175 |
-
|
176 |
with gr.Blocks(title="BAYER", css=".gradio-container {margin-top:10px !important; margin-bottom: 20px !important, min-width: 100% !important} footer {visibility:hidden}", theme=theme) as demo:
|
177 |
with gr.Row():
|
178 |
gr.Markdown(description)
|
179 |
with gr.Row():
|
180 |
with gr.Column(scale=1):
|
181 |
-
image = gr.Image(source="upload", type="filepath", optional=False, label="Imagen")
|
182 |
-
example = gr.Examples(examples=examples, inputs=image)
|
183 |
with gr.Column(scale=2):
|
184 |
with gr.Row():
|
185 |
with gr.Column(scale=1):
|
186 |
crop = gr.Dropdown(CROPS, label="Cultivo", value="Trigo", info="¿Qué cultivo hay plantado?")
|
187 |
area = gr.Number(value=1000, label="Superficie", info="¿Cuántos metros cuadrados ocupa la maleza?")
|
188 |
state = gr.Dropdown(STATE, label="Estado", value="post-emergencia", info="¿En qué estado de crecimiento está el cultivo?")
|
189 |
-
location = gr.Dropdown(LOCATION, label="Provincia", value="Provincia de Buenos Aires", info="¿En qué provincia está tu cultivo")
|
190 |
btn = gr.Button(value="Recomendar")
|
191 |
-
with gr.Row():
|
192 |
gr.Markdown("<br><br><h2>Maleza detectada</h2>")
|
193 |
with gr.Row():
|
194 |
output = gr.components.Label(num_top_classes=1)
|
@@ -196,7 +215,9 @@ with gr.Blocks(title="BAYER", css=".gradio-container {margin-top:10px !important
|
|
196 |
output2 =gr.components.HTML()
|
197 |
with gr.Row():
|
198 |
gr.Markdown(article)
|
199 |
-
|
200 |
-
btn.click(predict, inputs=[image, crop, area, state, location], outputs=[output, output2], api_name="BAYER")
|
201 |
|
202 |
demo.launch(favicon_path="favicon.ico", enable_queue=enable_queue)
|
|
|
|
|
|
22 |
with open("PROVIDERS.json", "r") as f:
|
23 |
providers = json.load(f)
|
24 |
|
25 |
+
|
26 |
+
script = """
|
27 |
+
async () => {
|
28 |
+
|
29 |
+
var intervalId = setInterval(function() {
|
30 |
+
var outputElement = document.querySelector('.output-class');
|
31 |
+
if (outputElement && outputElement.textContent.trim() !== "") {
|
32 |
+
outputElement.scrollIntoView({ behavior: 'smooth' });
|
33 |
+
// Si hay contenido en outputElement, se asume que se ha obtenido un resultado
|
34 |
+
clearInterval(intervalId); // Detiene la ejecución del intervalo
|
35 |
+
} else {
|
36 |
+
console.log("Hola");
|
37 |
+
}
|
38 |
+
}, 200); // 200 milisegundos
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
"""
|
43 |
# %% ../weed_classifier.ipynb 3
|
44 |
labels = learn.dls.vocab
|
45 |
|
|
|
73 |
|
74 |
# Añadir recomendaciones de productos
|
75 |
# Añadir recomendaciones de productos
|
76 |
+
output_html= "<h2>Herbicidas recomendados</h2>"
|
77 |
output_list = []
|
78 |
for product in products:
|
79 |
if (state in product["crop_stage"] or state=="ambos") and (crop in product["crop_type"] or crop=="Otro"):
|
|
|
141 |
<a href='{product_url}' target='_blank'>Más info</a>
|
142 |
</div>
|
143 |
<hr width='100%' >
|
144 |
+
|
145 |
|
146 |
"""
|
147 |
output_list.append(card)
|
148 |
+
|
149 |
|
150 |
if not output_list:
|
151 |
output_html += f"<p>No hay productos disponibles para este tipo de maleza actualmente.</p>"
|
|
|
160 |
# %% ../weed_classifier.ipynb 5
|
161 |
article = """<div><p style="text-align:center">La intuitiva interfaz presenta información detallada sobre los herbicidas, destacando sus características, beneficios y aplicaciones recomendadas. Mantenemos actualizada nuestra base de datos con los últimos avances en la protección de cultivos para ofrecerte la información más actualizada.</p>
|
162 |
<p style="text-align:center">Esta herramienta no solo simplifica la toma de decisiones, sino que también fomenta una gestión más sostenible de los cultivos, alineándose con las mejores prácticas agrícolas y el cuidado responsable del medio ambiente.</p>
|
163 |
+
<p style="text-align:center">Este modelo se entrenó con un conjunto de datos que contiene 5.539 imágenes de plántulas de cultivos y malas hierbas. Las imágenes se agrupan en 12 clases. Estas clases representan especies de plantas comunes en la agricultura danesa en distintas fases de crecimiento. Se ajustó un modelo ResNet34 preentrenado utilizando la biblioteca de visión fastai. La tasa de error alcanzada en el conjunto de datos de validación es del 2,5% tras 4 épocas. </p>
|
164 |
<p style='text-align: center;padding:1rem;display: flex; justify-content:center;align-items: center;'><a href='https://sciling.com' target='_blank'><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ8AAABECAYAAABebDjMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cm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3B1IGvUsNx2wEwp9DnGqss7+bEXrsA85BlWf+AeKfQwY1WewsysjMFlo25Qge3S+A7LtwG3eRX7j+ESFLbBpWhvhfN9LVzJifB/vo0LRPfgjjweB+7v/GSEu678jQ7qLV6jsj0QtQellk9i+n8VnXpqYZaMagAAAABJRU5ErkJggg==" width="150px"></a></p>
|
165 |
</div>"""
|
166 |
|
|
|
192 |
)
|
193 |
|
194 |
|
|
|
195 |
with gr.Blocks(title="BAYER", css=".gradio-container {margin-top:10px !important; margin-bottom: 20px !important, min-width: 100% !important} footer {visibility:hidden}", theme=theme) as demo:
|
196 |
with gr.Row():
|
197 |
gr.Markdown(description)
|
198 |
with gr.Row():
|
199 |
with gr.Column(scale=1):
|
200 |
+
image = gr.Image(source="upload", type="filepath", optional=False, label="Imagen", value='Shepered_purse.jpeg')
|
201 |
+
example = gr.Examples(examples=examples, inputs=image, label="Malezas de ejemplo")
|
202 |
with gr.Column(scale=2):
|
203 |
with gr.Row():
|
204 |
with gr.Column(scale=1):
|
205 |
crop = gr.Dropdown(CROPS, label="Cultivo", value="Trigo", info="¿Qué cultivo hay plantado?")
|
206 |
area = gr.Number(value=1000, label="Superficie", info="¿Cuántos metros cuadrados ocupa la maleza?")
|
207 |
state = gr.Dropdown(STATE, label="Estado", value="post-emergencia", info="¿En qué estado de crecimiento está el cultivo?")
|
208 |
+
location = gr.Dropdown(LOCATION, label="Provincia", value="Provincia de Buenos Aires", info="¿En qué provincia está tu cultivo?")
|
209 |
btn = gr.Button(value="Recomendar")
|
210 |
+
with gr.Row(elem_id="idxx"):
|
211 |
gr.Markdown("<br><br><h2>Maleza detectada</h2>")
|
212 |
with gr.Row():
|
213 |
output = gr.components.Label(num_top_classes=1)
|
|
|
215 |
output2 =gr.components.HTML()
|
216 |
with gr.Row():
|
217 |
gr.Markdown(article)
|
218 |
+
demo.load(None,None,None,_js=script)
|
219 |
+
btn.click(fn=predict, inputs=[image, crop, area, state, location], outputs=[output, output2], api_name="BAYER")
|
220 |
|
221 |
demo.launch(favicon_path="favicon.ico", enable_queue=enable_queue)
|
222 |
+
|
223 |
+
# %%
|