MarvinRoque commited on
Commit
360772d
·
1 Parent(s): 5d2fbe8
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -219,6 +219,7 @@ def detectar_musculos(texto: str) -> list[str]:
219
  return list(detectados)
220
 
221
  def montar_treino(musculos_alvo, budget=45):
 
222
  treino = []
223
  custo_total = 0
224
  usados = set()
@@ -292,8 +293,11 @@ def montar_treino(musculos_alvo, budget=45):
292
  continue
293
  if custo_total >= budget:
294
  break
 
 
295
 
296
  return treino, custo_total
 
297
  # -------------------------
298
  # Função principal
299
  # -------------------------
 
219
  return list(detectados)
220
 
221
  def montar_treino(musculos_alvo, budget=45):
222
+
223
  treino = []
224
  custo_total = 0
225
  usados = set()
 
293
  continue
294
  if custo_total >= budget:
295
  break
296
+ # 🔽 Ordenar o treino: primeiro os mais exigentes
297
+ treino.sort(key=lambda x: x["custo_unit"], reverse=True)
298
 
299
  return treino, custo_total
300
+
301
  # -------------------------
302
  # Função principal
303
  # -------------------------