AIdeaText commited on
Commit
5d15c3d
1 Parent(s): a16e1cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -14,6 +14,16 @@ def check_gpu():
14
  return gpu_info
15
  return {"GPU Disponible": False}
16
 
 
 
 
 
 
 
 
 
 
 
17
  class LlamaDemo:
18
  def __init__(self):
19
  self.model_name = "meta-llama/Llama-2-7b-chat-hf"
 
14
  return gpu_info
15
  return {"GPU Disponible": False}
16
 
17
+ # Configurar autenticación
18
+ def setup_auth():
19
+ if 'HUGGING_FACE_TOKEN' in st.secrets:
20
+ login(st.secrets['HUGGING_FACE_TOKEN'])
21
+ return True
22
+ else:
23
+ st.error("No se encontró el token de Hugging Face en los secrets")
24
+ st.stop()
25
+ return False
26
+
27
  class LlamaDemo:
28
  def __init__(self):
29
  self.model_name = "meta-llama/Llama-2-7b-chat-hf"