Update app.py
Browse files
app.py
CHANGED
|
@@ -23,17 +23,15 @@ def generate_binary_armor_depth(files):
|
|
| 23 |
# 1. Gera a Profundidade Base
|
| 24 |
depth_raw = pipe(img)["depth"]
|
| 25 |
|
| 26 |
-
# --- UPDATE V5: BINARY ARMOR ---
|
| 27 |
-
#
|
| 28 |
-
#
|
| 29 |
-
|
| 30 |
-
depth_dilated = depth_raw.filter(ImageFilter.MaxFilter(10))
|
| 31 |
|
| 32 |
# 3. SEM BLUR:
|
| 33 |
-
#
|
| 34 |
-
# O derretimento acontecia justamente na suavização do cinza.
|
| 35 |
depth_final = depth_dilated
|
| 36 |
-
# -------------------------------
|
| 37 |
|
| 38 |
# Salva no ZIP
|
| 39 |
base_name = os.path.basename(file.name)
|
|
@@ -48,9 +46,9 @@ def generate_binary_armor_depth(files):
|
|
| 48 |
demo = gr.Interface(
|
| 49 |
fn=generate_binary_armor_depth,
|
| 50 |
inputs=gr.File(file_count="multiple", label="1. Envie suas artes 2.0"),
|
| 51 |
-
outputs=gr.File(label="2. Baixe o ZIP (Máscaras Blindadas V5)"),
|
| 52 |
-
title="🎥 Eternity Engine v5.
|
| 53 |
-
description="
|
| 54 |
)
|
| 55 |
|
| 56 |
demo.launch()
|
|
|
|
| 23 |
# 1. Gera a Profundidade Base
|
| 24 |
depth_raw = pipe(img)["depth"]
|
| 25 |
|
| 26 |
+
# --- UPDATE V5.1: BINARY ARMOR (CORRIGIDO) ---
|
| 27 |
+
# O tamanho do MaxFilter DEVE ser ímpar (3, 5, 7, 9, 11, 13...)
|
| 28 |
+
# Ajustado para 11 para garantir blindagem total sem erro de sistema.
|
| 29 |
+
depth_dilated = depth_raw.filter(ImageFilter.MaxFilter(11))
|
|
|
|
| 30 |
|
| 31 |
# 3. SEM BLUR:
|
| 32 |
+
# Mantemos as bordas secas para o Parallax V15 (HTML) não derreter a linha.
|
|
|
|
| 33 |
depth_final = depth_dilated
|
| 34 |
+
# ---------------------------------------------
|
| 35 |
|
| 36 |
# Salva no ZIP
|
| 37 |
base_name = os.path.basename(file.name)
|
|
|
|
| 46 |
demo = gr.Interface(
|
| 47 |
fn=generate_binary_armor_depth,
|
| 48 |
inputs=gr.File(file_count="multiple", label="1. Envie suas artes 2.0"),
|
| 49 |
+
outputs=gr.File(label="2. Baixe o ZIP (Máscaras Blindadas V5.1)"),
|
| 50 |
+
title="🎥 Eternity Engine v5.1 - Binary Armor Generator",
|
| 51 |
+
description="CORREÇÃO: Filtro ajustado para tamanho ímpar (11). Gera máscaras blindadas para o Parallax V15."
|
| 52 |
)
|
| 53 |
|
| 54 |
demo.launch()
|