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