Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import time
|
|
| 8 |
st.title("Llama Chatbot")
|
| 9 |
|
| 10 |
# Get the API key from the environment variable
|
| 11 |
-
|
| 12 |
|
| 13 |
icons = {"assistant": "robot.png", "user": "man-kddi.png", "system": "man-kddi.png"}
|
| 14 |
|
|
@@ -22,7 +22,7 @@ API_URL = "https://api-inference.huggingface.co/models/meta-llama/Meta-Llama-3-8
|
|
| 22 |
# Define the headers
|
| 23 |
headers = {
|
| 24 |
'Content-Type': 'application/json',
|
| 25 |
-
'Authorization': f'Bearer {
|
| 26 |
}
|
| 27 |
|
| 28 |
def format_llama_messages(messages):
|
|
|
|
| 8 |
st.title("Llama Chatbot")
|
| 9 |
|
| 10 |
# Get the API key from the environment variable
|
| 11 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 12 |
|
| 13 |
icons = {"assistant": "robot.png", "user": "man-kddi.png", "system": "man-kddi.png"}
|
| 14 |
|
|
|
|
| 22 |
# Define the headers
|
| 23 |
headers = {
|
| 24 |
'Content-Type': 'application/json',
|
| 25 |
+
'Authorization': f'Bearer {HF_TOKEN}'
|
| 26 |
}
|
| 27 |
|
| 28 |
def format_llama_messages(messages):
|