JaphetHernandez commited on
Commit
3472573
1 Parent(s): 5e5f699

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -5,9 +5,11 @@ from langchain import PromptTemplate, LLMChain
5
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
6
  from huggingface_hub import login
7
 
8
- # Iniciar sesión en Hugging Face con Fireworks API Key
9
- fireworks_token = st.secrets["HUGGINGFACE_FIREWORKS_APIKEY"]
10
- login(fireworks_token)
 
 
11
 
12
 
13
  # Configurar modelo Llama 3.1
 
5
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
6
  from huggingface_hub import login
7
 
8
+ try:
9
+ fireworks_token = st.secrets["HUGGINGFACE_FIREWORKS_APIKEY"]
10
+ st.write("Token encontrado:", fireworks_token)
11
+ except KeyError:
12
+ st.error("La clave 'HUGGINGFACE_FIREWORKS_APIKEY' no está configurada en secrets.toml.")
13
 
14
 
15
  # Configurar modelo Llama 3.1