Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,10 +2,11 @@ import streamlit as st
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
# Third-party API endpoint and headers
|
|
|
|
| 5 |
API_URL = "https://api.hyperbolic.xyz/v1/chat/completions"
|
| 6 |
API_HEADERS = {
|
| 7 |
"Content-Type": "application/json",
|
| 8 |
-
"Authorization": "Bearer
|
| 9 |
}
|
| 10 |
|
| 11 |
# Define the bot's persona
|
|
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
# Third-party API endpoint and headers
|
| 5 |
+
API_KEY = st.secrets["API_KEY"]
|
| 6 |
API_URL = "https://api.hyperbolic.xyz/v1/chat/completions"
|
| 7 |
API_HEADERS = {
|
| 8 |
"Content-Type": "application/json",
|
| 9 |
+
"Authorization": "Bearer {API_KEY}"
|
| 10 |
}
|
| 11 |
|
| 12 |
# Define the bot's persona
|