Raffaele Terribile
commited on
Aggiungi lettura token di autenticazione
Browse files- app.py +4 -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
|
|
|
|
|
30 |
model = InferenceClientModel(
|
31 |
-
token=
|
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
|