YellowAlberto commited on
Commit
4da054a
·
verified ·
1 Parent(s): 6bf5366

Update app_front.py

Browse files
Files changed (1) hide show
  1. app_front.py +1 -4
app_front.py CHANGED
@@ -6,8 +6,6 @@ from PIL import Image
6
  # URL interna de la API
7
  API_URL = "http://127.0.0.1:8000"
8
 
9
- # --- FUNCIONES DE LÓGICA ---
10
-
11
  def registrar_usuario(new_user, new_pass):
12
  if not new_user or not new_pass:
13
  return "⚠️ Por favor, rellena ambos campos."
@@ -61,7 +59,6 @@ def analizar_foto(token, imagen):
61
  except Exception as e:
62
  return f"🚨 Error: {str(e)}", None
63
 
64
- # --- INTERFAZ GRADIO ---
65
 
66
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
67
  # Estado para mantener el token de sesión activo entre pestañas
@@ -103,7 +100,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
103
  btn_scan = gr.Button("Analizar con IA", variant="primary")
104
  with gr.Column():
105
  txt_output = gr.Markdown("Esperando inicio de sesión...")
106
- img_output = gr.Image(label="Detección YOLO")
107
 
108
  btn_scan.click(analizar_foto, [token_state, img_input], [txt_output, img_output])
109
 
 
6
  # URL interna de la API
7
  API_URL = "http://127.0.0.1:8000"
8
 
 
 
9
  def registrar_usuario(new_user, new_pass):
10
  if not new_user or not new_pass:
11
  return "⚠️ Por favor, rellena ambos campos."
 
59
  except Exception as e:
60
  return f"🚨 Error: {str(e)}", None
61
 
 
62
 
63
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
64
  # Estado para mantener el token de sesión activo entre pestañas
 
100
  btn_scan = gr.Button("Analizar con IA", variant="primary")
101
  with gr.Column():
102
  txt_output = gr.Markdown("Esperando inicio de sesión...")
103
+ img_output = gr.Image()
104
 
105
  btn_scan.click(analizar_foto, [token_state, img_input], [txt_output, img_output])
106