Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,7 +76,7 @@ def aggiorna_sliders(spazio_principale, spazio_altri):
|
|
| 76 |
spazio = get_spazio_attivo(spazio_principale, spazio_altri)
|
| 77 |
|
| 78 |
if spazio == "HSV":
|
| 79 |
-
return (gr.update(label="Tinta (H) Min", value=
|
| 80 |
gr.update(label="Saturazione (S) Min", value=40, visible=True), gr.update(label="Saturazione (S) Max", value=255, visible=True),
|
| 81 |
gr.update(label="Valore (V) Min", value=40, visible=True), gr.update(label="Valore (V) Max", value=255, visible=True))
|
| 82 |
elif spazio == "ExG":
|
|
@@ -412,7 +412,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green")) as app:
|
|
| 412 |
log_geom = gr.Textbox(label="Log di Sistema")
|
| 413 |
|
| 414 |
with gr.Group(visible=False) as box_area_rif:
|
| 415 |
-
input_area_rif = gr.Number(label="Inserisci Area Reale Riferimento (opzionale)")
|
| 416 |
|
| 417 |
sliders_r = [r1_min, r1_max, r2_min, r2_max, r3_min, r3_max]
|
| 418 |
|
|
@@ -431,7 +431,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green")) as app:
|
|
| 431 |
with gr.Tab("🌱 Fase 2: Segmentazione Colore e ExG"):
|
| 432 |
with gr.Group():
|
| 433 |
with gr.Row():
|
| 434 |
-
sp_main_l = gr.Radio(["HSV", "ExG"], value="ExG", label="
|
| 435 |
with gr.Accordion("Altri Spazi di Colore (Avanzato)", open=False):
|
| 436 |
sp_altri_l = gr.Radio(["Nessuno", "RGB", "LAB"], value="Nessuno", label="Override Spazio Colore")
|
| 437 |
|
|
|
|
| 76 |
spazio = get_spazio_attivo(spazio_principale, spazio_altri)
|
| 77 |
|
| 78 |
if spazio == "HSV":
|
| 79 |
+
return (gr.update(label="Tinta (H) Min", value=30, maximum=179, visible=True), gr.update(label="Tinta (H) Max", value=80, maximum=179, visible=True),
|
| 80 |
gr.update(label="Saturazione (S) Min", value=40, visible=True), gr.update(label="Saturazione (S) Max", value=255, visible=True),
|
| 81 |
gr.update(label="Valore (V) Min", value=40, visible=True), gr.update(label="Valore (V) Max", value=255, visible=True))
|
| 82 |
elif spazio == "ExG":
|
|
|
|
| 412 |
log_geom = gr.Textbox(label="Log di Sistema")
|
| 413 |
|
| 414 |
with gr.Group(visible=False) as box_area_rif:
|
| 415 |
+
input_area_rif = gr.Number(label="Inserisci Area Reale Riferimento in cm² (opzionale)")
|
| 416 |
|
| 417 |
sliders_r = [r1_min, r1_max, r2_min, r2_max, r3_min, r3_max]
|
| 418 |
|
|
|
|
| 431 |
with gr.Tab("🌱 Fase 2: Segmentazione Colore e ExG"):
|
| 432 |
with gr.Group():
|
| 433 |
with gr.Row():
|
| 434 |
+
sp_main_l = gr.Radio(["HSV", "ExG"], value="ExG", label="in RGB, ExG = 2G - R - B")
|
| 435 |
with gr.Accordion("Altri Spazi di Colore (Avanzato)", open=False):
|
| 436 |
sp_altri_l = gr.Radio(["Nessuno", "RGB", "LAB"], value="Nessuno", label="Override Spazio Colore")
|
| 437 |
|