Upload 30 files
Browse files- api_client.py +6 -73
- app.py +1 -5
- scripts/verify_temp_dbs.py +5 -75
api_client.py
CHANGED
|
@@ -21,11 +21,6 @@ class APIClient:
|
|
| 21 |
self.base_url = (env_engine_url or base_url or "").rstrip("/")
|
| 22 |
# URL específica para el servicio TTS (por defecto usa la variable de entorno API_TTS_URL)
|
| 23 |
self.tts_url = tts_url or os.getenv("API_TTS_URL", "https://veureu-tts.hf.space")
|
| 24 |
-
print(f"🔧 APIClient.__init__ - tts_url recibida: {tts_url}")
|
| 25 |
-
print(f"🔧 APIClient.__init__ - os.getenv(API_TTS_URL): {os.getenv('API_TTS_URL')}")
|
| 26 |
-
print(f"🔧 APIClient.__init__ - self.tts_url final: {self.tts_url}")
|
| 27 |
-
print(f"🔧 APIClient.__init__ - tipo self.tts_url: {type(self.tts_url)}")
|
| 28 |
-
print(f"🔧 APIClient.__init__ - repr self.tts_url: {repr(self.tts_url)}")
|
| 29 |
self.use_mock = use_mock
|
| 30 |
self.data_dir = data_dir
|
| 31 |
self.timeout = timeout
|
|
@@ -134,19 +129,12 @@ class APIClient:
|
|
| 134 |
if not self.tts_url:
|
| 135 |
raise ValueError("La URL del servei TTS no està configurada (API_TTS_URL)")
|
| 136 |
|
| 137 |
-
print(f"🔧 tts_matxa - self.tts_url ANTES de construir URL: {self.tts_url}")
|
| 138 |
-
print(f"🔧 tts_matxa - tipo self.tts_url: {type(self.tts_url)}")
|
| 139 |
-
print(f"🔧 tts_matxa - repr self.tts_url: {repr(self.tts_url)}")
|
| 140 |
-
|
| 141 |
# Usar endpoint apropiado según la longitud del texto
|
| 142 |
if len(text) > 480:
|
| 143 |
url = f"{self.tts_url.rstrip('/')}/tts/text_long"
|
| 144 |
else:
|
| 145 |
url = f"{self.tts_url.rstrip('/')}/tts/text"
|
| 146 |
-
|
| 147 |
-
print(f"🔧 tts_matxa - URL final construida: {url}")
|
| 148 |
-
print(f"🔧 tts_matxa - repr URL final: {repr(url)}")
|
| 149 |
-
|
| 150 |
data = {
|
| 151 |
"texto": text,
|
| 152 |
"voice": voice,
|
|
@@ -154,24 +142,10 @@ class APIClient:
|
|
| 154 |
}
|
| 155 |
|
| 156 |
try:
|
| 157 |
-
|
| 158 |
-
print(f"📝 Texto length: {len(text)} caracteres")
|
| 159 |
-
print(f"🗣️ Voz: {voice}")
|
| 160 |
-
|
| 161 |
-
r = self.session.post(url, data=data, timeout=self.timeout * 2) # Más tiempo para textos largos
|
| 162 |
-
print(f"📊 Response status: {r.status_code}")
|
| 163 |
-
|
| 164 |
r.raise_for_status()
|
| 165 |
-
|
| 166 |
-
# Devolver los bytes directamente para que el cliente los pueda concatenar
|
| 167 |
-
print(f"✅ Audio recibido: {len(r.content)} bytes")
|
| 168 |
return {"mp3_bytes": r.content}
|
| 169 |
-
|
| 170 |
except requests.exceptions.RequestException as e:
|
| 171 |
-
print(f"❌ Error cridant a TTS: {e}")
|
| 172 |
-
print(f"❌ URL: {url}")
|
| 173 |
-
print(f"❌ Data: {data}")
|
| 174 |
-
# Devolvemos un diccionario con error para que la UI lo muestre
|
| 175 |
return {"error": str(e)}
|
| 176 |
|
| 177 |
|
|
@@ -190,7 +164,6 @@ class APIClient:
|
|
| 190 |
# El endpoint devuelve un ZIP binario
|
| 191 |
return {"zip_bytes": r.content}
|
| 192 |
except requests.exceptions.RequestException as e:
|
| 193 |
-
print(f"[import_databases] Error: {e}")
|
| 194 |
return {"error": str(e)}
|
| 195 |
|
| 196 |
|
|
@@ -610,13 +583,7 @@ class APIClient:
|
|
| 610 |
raise ValueError("La URL del servei TTS no està configurada (API_TTS_URL)")
|
| 611 |
|
| 612 |
url = f"{self.tts_url.rstrip('/')}/tts/srt"
|
| 613 |
-
|
| 614 |
-
print(f"🎬 Reconstruyendo video con AD")
|
| 615 |
-
print(f"🎯 URL TTS: {url}")
|
| 616 |
-
print(f"📹 Video: {video_path}")
|
| 617 |
-
print(f"📝 SRT: {srt_path}")
|
| 618 |
-
print(f"🗣️ Voz: {voice}")
|
| 619 |
-
|
| 620 |
try:
|
| 621 |
with open(video_path, 'rb') as video_file:
|
| 622 |
with open(srt_path, 'rb') as srt_file:
|
|
@@ -645,12 +612,10 @@ class APIClient:
|
|
| 645 |
return {"error": "No se encontró el archivo de vídeo MP4 en la respuesta del servidor."}
|
| 646 |
|
| 647 |
except requests.exceptions.RequestException as e:
|
| 648 |
-
print(f"Error cridant a la reconstrucció de vídeo: {e}")
|
| 649 |
return {"error": str(e)}
|
| 650 |
except zipfile.BadZipFile:
|
| 651 |
return {"error": "La respuesta del servidor no fue un archivo ZIP válido."}
|
| 652 |
except Exception as e:
|
| 653 |
-
print(f"Error inesperat: {e}")
|
| 654 |
return {"error": str(e)}
|
| 655 |
|
| 656 |
|
|
@@ -882,7 +847,6 @@ class APIClient:
|
|
| 882 |
return {"mp3_bytes": r.content}
|
| 883 |
|
| 884 |
except requests.exceptions.RequestException as e:
|
| 885 |
-
print(f"Error cridant a TTS per a text llarg: {e}")
|
| 886 |
return {"error": str(e)}
|
| 887 |
|
| 888 |
|
|
@@ -915,12 +879,7 @@ def describe_image_with_svision(image_path: str, is_face: bool = True) -> Tuple[
|
|
| 915 |
|
| 916 |
# Conectar al space svision con timeout generoso per al cold start de ZeroGPU
|
| 917 |
svision_url = os.getenv("SVISION_URL", "https://veureu-svision.hf.space")
|
| 918 |
-
print(f"[svision] Connectant a {svision_url}...")
|
| 919 |
-
|
| 920 |
-
# La versió actual de gradio_client al Space no accepta el paràmetre hf_token al constructor.
|
| 921 |
-
# Confiem en la configuració d'entorn del Space per a l'autenticació (si s'escau).
|
| 922 |
client = Client(svision_url)
|
| 923 |
-
print("[svision] Client creat (sense hf_token explícit)")
|
| 924 |
|
| 925 |
# Preparar prompt según el tipo
|
| 926 |
if is_face:
|
|
@@ -928,9 +887,6 @@ def describe_image_with_svision(image_path: str, is_face: bool = True) -> Tuple[
|
|
| 928 |
else:
|
| 929 |
prompt = "Descriu aquesta escena breument en 2-3 frases: tipus de localització i elements principals."
|
| 930 |
|
| 931 |
-
print(f"[svision] Enviant petició (pot trigar si ZeroGPU està en cold start)...")
|
| 932 |
-
print(f"[svision] Image path: {image_path}")
|
| 933 |
-
|
| 934 |
import time
|
| 935 |
start_time = time.time()
|
| 936 |
max_tokens = 256 if is_face else 128
|
|
@@ -941,7 +897,6 @@ def describe_image_with_svision(image_path: str, is_face: bool = True) -> Tuple[
|
|
| 941 |
|
| 942 |
for attempt in range(1, max_attempts + 1):
|
| 943 |
try:
|
| 944 |
-
print(f"[svision] Attempt {attempt}/{max_attempts} (wait={wait_seconds}s)")
|
| 945 |
result = client.predict(
|
| 946 |
handle_file(image_path),
|
| 947 |
prompt,
|
|
@@ -954,15 +909,11 @@ def describe_image_with_svision(image_path: str, is_face: bool = True) -> Tuple[
|
|
| 954 |
raise RuntimeError("Resposta buida de svision")
|
| 955 |
except Exception as exc:
|
| 956 |
last_error = exc
|
| 957 |
-
print(f"[svision] Error attempt {attempt}/{max_attempts}: {exc}")
|
| 958 |
if attempt == max_attempts:
|
| 959 |
raise
|
| 960 |
time.sleep(wait_seconds)
|
| 961 |
wait_seconds = min(wait_seconds * 2, 40)
|
| 962 |
|
| 963 |
-
elapsed = time.time() - start_time
|
| 964 |
-
print(f"[svision] Resposta rebuda en {elapsed:.1f}s")
|
| 965 |
-
|
| 966 |
full_description = result.strip() if result else ""
|
| 967 |
|
| 968 |
# PASO 1: Eliminar el prompt original que puede aparecer en la respuesta
|
|
@@ -1036,15 +987,9 @@ def describe_image_with_svision(image_path: str, is_face: bool = True) -> Tuple[
|
|
| 1036 |
words = full_description.split()[:4]
|
| 1037 |
short_name = " ".join(words).capitalize()
|
| 1038 |
|
| 1039 |
-
print(f"[svision] Descripció generada: {full_description[:100]}...")
|
| 1040 |
-
print(f"[svision] Nom: {short_name}")
|
| 1041 |
-
|
| 1042 |
return (full_description, short_name)
|
| 1043 |
-
|
| 1044 |
except Exception as e:
|
| 1045 |
-
print(f"[svision] Error al descriure imatge: {e}")
|
| 1046 |
-
import traceback
|
| 1047 |
-
traceback.print_exc()
|
| 1048 |
return ("", "")
|
| 1049 |
|
| 1050 |
|
|
@@ -1065,18 +1010,11 @@ def generate_short_scene_name(description: str) -> str:
|
|
| 1065 |
|
| 1066 |
# URL del space schat
|
| 1067 |
schat_url = os.getenv("SCHAT_URL", "https://veureu-schat.hf.space")
|
| 1068 |
-
print(f"[schat] Connectant a {schat_url}...")
|
| 1069 |
-
|
| 1070 |
-
# La versió actual de gradio_client al Space no accepta el paràmetre hf_token.
|
| 1071 |
-
# Confiem en la configuració d'entorn per a l'autenticació si és necessari.
|
| 1072 |
client = Client(schat_url)
|
| 1073 |
-
print("[schat] Client creat (sense hf_token explícit)")
|
| 1074 |
|
| 1075 |
# Preparar prompt
|
| 1076 |
prompt = f"Basant-te en aquesta descripció d'una escena, genera un nom curt de menys de 3 paraules que la resumeixi:\n\n{description}\n\nNom de l'escena:"
|
| 1077 |
-
|
| 1078 |
-
print(f"[schat] Generant nom curt per descripció: {description[:100]}...")
|
| 1079 |
-
|
| 1080 |
# Llamar al endpoint /predict de schat
|
| 1081 |
# Parámetros típicos: mensaje, historial, max_new_tokens, temperature, top_p, top_k, repetition_penalty
|
| 1082 |
result = client.predict(
|
|
@@ -1118,12 +1056,7 @@ def generate_short_scene_name(description: str) -> str:
|
|
| 1118 |
if len(words) > 3:
|
| 1119 |
short_name = " ".join(words[:3])
|
| 1120 |
|
| 1121 |
-
print(f"[schat] Nom curt generat: {short_name}")
|
| 1122 |
-
|
| 1123 |
return short_name
|
| 1124 |
-
|
| 1125 |
except Exception as e:
|
| 1126 |
-
print(f"[schat] Error al generar nom curt: {e}")
|
| 1127 |
-
import traceback
|
| 1128 |
-
traceback.print_exc()
|
| 1129 |
return ""
|
|
|
|
| 21 |
self.base_url = (env_engine_url or base_url or "").rstrip("/")
|
| 22 |
# URL específica para el servicio TTS (por defecto usa la variable de entorno API_TTS_URL)
|
| 23 |
self.tts_url = tts_url or os.getenv("API_TTS_URL", "https://veureu-tts.hf.space")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
self.use_mock = use_mock
|
| 25 |
self.data_dir = data_dir
|
| 26 |
self.timeout = timeout
|
|
|
|
| 129 |
if not self.tts_url:
|
| 130 |
raise ValueError("La URL del servei TTS no està configurada (API_TTS_URL)")
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
# Usar endpoint apropiado según la longitud del texto
|
| 133 |
if len(text) > 480:
|
| 134 |
url = f"{self.tts_url.rstrip('/')}/tts/text_long"
|
| 135 |
else:
|
| 136 |
url = f"{self.tts_url.rstrip('/')}/tts/text"
|
| 137 |
+
|
|
|
|
|
|
|
|
|
|
| 138 |
data = {
|
| 139 |
"texto": text,
|
| 140 |
"voice": voice,
|
|
|
|
| 142 |
}
|
| 143 |
|
| 144 |
try:
|
| 145 |
+
r = self.session.post(url, data=data, timeout=self.timeout * 2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
r.raise_for_status()
|
|
|
|
|
|
|
|
|
|
| 147 |
return {"mp3_bytes": r.content}
|
|
|
|
| 148 |
except requests.exceptions.RequestException as e:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
return {"error": str(e)}
|
| 150 |
|
| 151 |
|
|
|
|
| 164 |
# El endpoint devuelve un ZIP binario
|
| 165 |
return {"zip_bytes": r.content}
|
| 166 |
except requests.exceptions.RequestException as e:
|
|
|
|
| 167 |
return {"error": str(e)}
|
| 168 |
|
| 169 |
|
|
|
|
| 583 |
raise ValueError("La URL del servei TTS no està configurada (API_TTS_URL)")
|
| 584 |
|
| 585 |
url = f"{self.tts_url.rstrip('/')}/tts/srt"
|
| 586 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 587 |
try:
|
| 588 |
with open(video_path, 'rb') as video_file:
|
| 589 |
with open(srt_path, 'rb') as srt_file:
|
|
|
|
| 612 |
return {"error": "No se encontró el archivo de vídeo MP4 en la respuesta del servidor."}
|
| 613 |
|
| 614 |
except requests.exceptions.RequestException as e:
|
|
|
|
| 615 |
return {"error": str(e)}
|
| 616 |
except zipfile.BadZipFile:
|
| 617 |
return {"error": "La respuesta del servidor no fue un archivo ZIP válido."}
|
| 618 |
except Exception as e:
|
|
|
|
| 619 |
return {"error": str(e)}
|
| 620 |
|
| 621 |
|
|
|
|
| 847 |
return {"mp3_bytes": r.content}
|
| 848 |
|
| 849 |
except requests.exceptions.RequestException as e:
|
|
|
|
| 850 |
return {"error": str(e)}
|
| 851 |
|
| 852 |
|
|
|
|
| 879 |
|
| 880 |
# Conectar al space svision con timeout generoso per al cold start de ZeroGPU
|
| 881 |
svision_url = os.getenv("SVISION_URL", "https://veureu-svision.hf.space")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 882 |
client = Client(svision_url)
|
|
|
|
| 883 |
|
| 884 |
# Preparar prompt según el tipo
|
| 885 |
if is_face:
|
|
|
|
| 887 |
else:
|
| 888 |
prompt = "Descriu aquesta escena breument en 2-3 frases: tipus de localització i elements principals."
|
| 889 |
|
|
|
|
|
|
|
|
|
|
| 890 |
import time
|
| 891 |
start_time = time.time()
|
| 892 |
max_tokens = 256 if is_face else 128
|
|
|
|
| 897 |
|
| 898 |
for attempt in range(1, max_attempts + 1):
|
| 899 |
try:
|
|
|
|
| 900 |
result = client.predict(
|
| 901 |
handle_file(image_path),
|
| 902 |
prompt,
|
|
|
|
| 909 |
raise RuntimeError("Resposta buida de svision")
|
| 910 |
except Exception as exc:
|
| 911 |
last_error = exc
|
|
|
|
| 912 |
if attempt == max_attempts:
|
| 913 |
raise
|
| 914 |
time.sleep(wait_seconds)
|
| 915 |
wait_seconds = min(wait_seconds * 2, 40)
|
| 916 |
|
|
|
|
|
|
|
|
|
|
| 917 |
full_description = result.strip() if result else ""
|
| 918 |
|
| 919 |
# PASO 1: Eliminar el prompt original que puede aparecer en la respuesta
|
|
|
|
| 987 |
words = full_description.split()[:4]
|
| 988 |
short_name = " ".join(words).capitalize()
|
| 989 |
|
|
|
|
|
|
|
|
|
|
| 990 |
return (full_description, short_name)
|
| 991 |
+
|
| 992 |
except Exception as e:
|
|
|
|
|
|
|
|
|
|
| 993 |
return ("", "")
|
| 994 |
|
| 995 |
|
|
|
|
| 1010 |
|
| 1011 |
# URL del space schat
|
| 1012 |
schat_url = os.getenv("SCHAT_URL", "https://veureu-schat.hf.space")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1013 |
client = Client(schat_url)
|
|
|
|
| 1014 |
|
| 1015 |
# Preparar prompt
|
| 1016 |
prompt = f"Basant-te en aquesta descripció d'una escena, genera un nom curt de menys de 3 paraules que la resumeixi:\n\n{description}\n\nNom de l'escena:"
|
| 1017 |
+
|
|
|
|
|
|
|
| 1018 |
# Llamar al endpoint /predict de schat
|
| 1019 |
# Parámetros típicos: mensaje, historial, max_new_tokens, temperature, top_p, top_k, repetition_penalty
|
| 1020 |
result = client.predict(
|
|
|
|
| 1056 |
if len(words) > 3:
|
| 1057 |
short_name = " ".join(words[:3])
|
| 1058 |
|
|
|
|
|
|
|
| 1059 |
return short_name
|
| 1060 |
+
|
| 1061 |
except Exception as e:
|
|
|
|
|
|
|
|
|
|
| 1062 |
return ""
|
app.py
CHANGED
|
@@ -85,11 +85,7 @@ BACKEND_BASE_URL = (
|
|
| 85 |
or "http://localhost:8000"
|
| 86 |
)
|
| 87 |
|
| 88 |
-
TTS_URL = "https://veureu-tts.hf.space"
|
| 89 |
-
print(f"🔧 TTS_URL configurada: {TTS_URL}")
|
| 90 |
-
print(f"🔧 Tipo de TTS_URL: {type(TTS_URL)}")
|
| 91 |
-
print(f"🔧 Longitud de TTS_URL: {len(TTS_URL)}")
|
| 92 |
-
print(f"🔧 TTS_URL repr: {repr(TTS_URL)}")
|
| 93 |
USE_MOCK = bool(CFG.get("app", {}).get("use_mock", False)) # si no la tienes en el yaml, queda False
|
| 94 |
|
| 95 |
COMPLIANCE_CFG = CFG.get("compliance", {}) or {}
|
|
|
|
| 85 |
or "http://localhost:8000"
|
| 86 |
)
|
| 87 |
|
| 88 |
+
TTS_URL = "https://veureu-tts.hf.space"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
USE_MOCK = bool(CFG.get("app", {}).get("use_mock", False)) # si no la tienes en el yaml, queda False
|
| 90 |
|
| 91 |
COMPLIANCE_CFG = CFG.get("compliance", {}) or {}
|
scripts/verify_temp_dbs.py
CHANGED
|
@@ -1,86 +1,16 @@
|
|
| 1 |
-
"""Verificador de BDs de la demo
|
| 2 |
|
| 3 |
-
|
| 4 |
-
- demo/data/db
|
| 5 |
-
- demo/temp/db
|
| 6 |
-
|
| 7 |
-
Se puede ejecutar como script independiente o invocado desde el código
|
| 8 |
-
para dejar trazas en el log.
|
| 9 |
"""
|
| 10 |
|
| 11 |
-
from pathlib import Path
|
| 12 |
-
import yaml
|
| 13 |
-
|
| 14 |
-
# Este archivo vive en demo/scripts, así que la raíz de demo es el padre
|
| 15 |
-
DEMO_ROOT = Path(__file__).resolve().parent.parent
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
def read_data_origin() -> str:
|
| 19 |
-
cfg_path = DEMO_ROOT / "config.yaml"
|
| 20 |
-
if not cfg_path.exists():
|
| 21 |
-
return "(config.yaml no encontrado)"
|
| 22 |
-
try:
|
| 23 |
-
with cfg_path.open("r", encoding="utf-8") as f:
|
| 24 |
-
cfg = yaml.safe_load(f) or {}
|
| 25 |
-
app_cfg = cfg.get("app", {}) or {}
|
| 26 |
-
return str(app_cfg.get("data_origin", "internal")).lower()
|
| 27 |
-
except Exception as e:
|
| 28 |
-
return f"(error leyendo config.yaml: {e})"
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
def list_dbs(path: Path) -> list[str]:
|
| 32 |
-
if not path.exists():
|
| 33 |
-
return []
|
| 34 |
-
return sorted(str(p.name) for p in path.glob("*.db"))
|
| 35 |
-
|
| 36 |
|
| 37 |
def run_verification() -> None:
|
| 38 |
-
"""
|
| 39 |
-
|
| 40 |
-
Pensado para ser llamado desde ensure_temp_databases para dejar
|
| 41 |
-
trazas en el log del Space demo.
|
| 42 |
-
"""
|
| 43 |
-
data_origin = read_data_origin()
|
| 44 |
-
data_db_dir = DEMO_ROOT / "data" / "db"
|
| 45 |
-
temp_db_dir = DEMO_ROOT / "temp" / "db"
|
| 46 |
-
|
| 47 |
-
print("=== Verificación de BDs demo (invocada desde Space demo) ===")
|
| 48 |
-
print(f"Raíz demo: {DEMO_ROOT}")
|
| 49 |
-
print(f"data_origin: {data_origin}")
|
| 50 |
-
print(f"data/db dir: {data_db_dir}")
|
| 51 |
-
print(f"temp/db dir: {temp_db_dir}")
|
| 52 |
-
print()
|
| 53 |
-
|
| 54 |
-
data_dbs = list_dbs(data_db_dir)
|
| 55 |
-
temp_dbs = list_dbs(temp_db_dir)
|
| 56 |
-
|
| 57 |
-
print("-- demo/data/db --")
|
| 58 |
-
if data_dbs:
|
| 59 |
-
for name in data_dbs:
|
| 60 |
-
print(f" - {name}")
|
| 61 |
-
else:
|
| 62 |
-
print(" (sin .db)")
|
| 63 |
-
print()
|
| 64 |
-
|
| 65 |
-
print("-- demo/temp/db --")
|
| 66 |
-
if temp_dbs:
|
| 67 |
-
for name in temp_dbs:
|
| 68 |
-
print(f" - {name}")
|
| 69 |
-
else:
|
| 70 |
-
print(" (sin .db)")
|
| 71 |
-
print()
|
| 72 |
-
|
| 73 |
-
missing_in_temp = [n for n in data_dbs if n not in temp_dbs]
|
| 74 |
-
if missing_in_temp:
|
| 75 |
-
print("Ficheros presentes en data/db pero NO en temp/db:")
|
| 76 |
-
for n in missing_in_temp:
|
| 77 |
-
print(f" - {n}")
|
| 78 |
-
else:
|
| 79 |
-
print("Todos los .db de data/db están también en temp/db (o no hay .db)")
|
| 80 |
|
| 81 |
|
| 82 |
def main() -> None:
|
| 83 |
-
|
| 84 |
|
| 85 |
|
| 86 |
if __name__ == "__main__":
|
|
|
|
| 1 |
+
"""Verificador de BDs de la demo — desactivado.
|
| 2 |
|
| 3 |
+
Este script ya no produce salida en logs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"""
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
def run_verification() -> None:
|
| 8 |
+
"""No-op: verificación desactivada."""
|
| 9 |
+
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
def main() -> None:
|
| 13 |
+
pass
|
| 14 |
|
| 15 |
|
| 16 |
if __name__ == "__main__":
|