Raffaele Terribile commited on
Commit
dc801f0
·
unverified ·
1 Parent(s): fbb9600

Aggiungi lettura token di autenticazione

Browse files
Files changed (2) hide show
  1. app.py +4 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -26,9 +26,11 @@ def invert_sentence(sentence: str) -> str:
26
  class FirstAgent:
27
  ### First Agent is the first attempt to develop an agent for the course. ###
28
  def __init__(self):
29
- # Usa un modello Hugging Face gratuito invece di Nebius
 
 
30
  model = InferenceClientModel(
31
- token=os.getenv(os.getenv("HF_TOKEN")) # Token HF se necessario
32
  )
33
 
34
  self.agent = CodeAgent(
 
26
  class FirstAgent:
27
  ### First Agent is the first attempt to develop an agent for the course. ###
28
  def __init__(self):
29
+ # Usa un modello Hugging Face gratuito
30
+ token = os.getenv(os.getenv("TOKEN_NAME"))
31
+ os.environ["HF_TOKEN"] = token
32
  model = InferenceClientModel(
33
+ token=token
34
  )
35
 
36
  self.agent = CodeAgent(
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- gradio
2
  requests
3
  pandas
4
  smolagents
 
1
+ gradio[oauth]
2
  requests
3
  pandas
4
  smolagents