JairoCesar commited on
Commit
4afe0ff
·
verified ·
1 Parent(s): 0c2ff13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -35,16 +35,16 @@ Este análisis es una herramienta informativa de IA y **NO es un diagnóstico m
35
 
36
  # --- CONFIGURACIÓN DE LA NUEVA API (google-genai) ---
37
  try:
38
- if 'GEMINI_API_KEY' in st.secrets:
39
- GEMINI_API_KEY = st.secrets['GEMINI_API_KEY']
40
  else:
41
- GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
42
- if not GEMINI_API_KEY:
43
- st.error("No se encontró la GEMINI_API_KEY.")
44
  st.stop()
45
 
46
  # NUEVA FORMA DE INICIAR EL CLIENTE
47
- client = genai.Client(api_key=GEMINI_API_KEY)
48
 
49
  except Exception as e:
50
  st.error(f"❌ Error al configurar Gemini API: {e}")
 
35
 
36
  # --- CONFIGURACIÓN DE LA NUEVA API (google-genai) ---
37
  try:
38
+ if 'APIkeydetective' in st.secrets:
39
+ APIkeydetective = st.secrets['APIkeydetective']
40
  else:
41
+ APIkeydetective = os.getenv("APIkeydetective")
42
+ if not APIkeydetective:
43
+ st.error("No se encontró la APIkeydetective.")
44
  st.stop()
45
 
46
  # NUEVA FORMA DE INICIAR EL CLIENTE
47
+ client = genai.Client(api_key=APIkeydetective)
48
 
49
  except Exception as e:
50
  st.error(f"❌ Error al configurar Gemini API: {e}")