Benjamin Consolvo
commited on
Commit
·
9b98cf2
1
Parent(s):
39da07a
endpoints update
Browse files- app.py +4 -3
- model_info.json +16 -16
app.py
CHANGED
@@ -25,6 +25,7 @@ with st.sidebar:
|
|
25 |
try:
|
26 |
#if you can provide the API key in the HF settings under "Variables and secrets", you will not need to enter your OpenAI-compatible API key every time.
|
27 |
st.session_state.api_key = st.secrets["openai_apikey"]
|
|
|
28 |
except KeyError:
|
29 |
# Add a text input for the API key if not in session state
|
30 |
api_key = st.text_input("Enter your API Key", type="password")
|
@@ -36,10 +37,10 @@ if "api_key" not in st.session_state or not st.session_state.api_key:
|
|
36 |
st.error("Please enter your API Key in the sidebar.")
|
37 |
else:
|
38 |
try:
|
39 |
-
endpoint = endpoint_data[modelname]
|
40 |
-
|
41 |
api_key = st.session_state.api_key
|
42 |
-
base_url =
|
|
|
43 |
client = OpenAI(api_key=api_key, base_url=base_url)
|
44 |
|
45 |
# Extract the model name
|
|
|
25 |
try:
|
26 |
#if you can provide the API key in the HF settings under "Variables and secrets", you will not need to enter your OpenAI-compatible API key every time.
|
27 |
st.session_state.api_key = st.secrets["openai_apikey"]
|
28 |
+
st.session_state.base_url = os.environ.get("base_url")
|
29 |
except KeyError:
|
30 |
# Add a text input for the API key if not in session state
|
31 |
api_key = st.text_input("Enter your API Key", type="password")
|
|
|
37 |
st.error("Please enter your API Key in the sidebar.")
|
38 |
else:
|
39 |
try:
|
40 |
+
# endpoint = endpoint_data[modelname]
|
|
|
41 |
api_key = st.session_state.api_key
|
42 |
+
base_url = st.session_state.base_url
|
43 |
+
# base_url = endpoint
|
44 |
client = OpenAI(api_key=api_key, base_url=base_url)
|
45 |
|
46 |
# Extract the model name
|
model_info.json
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
{
|
2 |
-
"DENVR: meta-llama/Llama-3.3-70B-Instruct": "https://api.inference.denvrdata.com/v1/
|
3 |
-
"DENVR: meta-llama/Meta-Llama-3.2-1B-Instruct": "https://api.inference.denvrdata.com/v1/
|
4 |
-
"DENVR: meta-llama/Meta-Llama-3.2-3B-Instruct": "https://api.inference.denvrdata.com/v1/
|
5 |
-
"DENVR: meta-llama/Meta-Llama-3.1-8B-Instruct": "https://api.inference.denvrdata.com/v1/
|
6 |
-
"DENVR: meta-llama/Meta-Llama-3.1-70B-Instruct": "https://api.inference.denvrdata.com/v1/
|
7 |
-
"DENVR: deepseek-ai/DeepSeek-R1-Distill-Llama-8B": "https://api.inference.denvrdata.com/v1/
|
8 |
-
"DENVR: deepseek-ai/DeepSeek-R1-Distill-Llama-70B": "https://api.inference.denvrdata.com/v1/
|
9 |
-
"DENVR: mistralai/Mistral-7B-Instruct-v0.2": "https://api.inference.denvrdata.com/v1/
|
10 |
-
"DENVR: mistralai/Mistral-7B-Instruct-v0.1": "https://api.inference.denvrdata.com/v1/
|
11 |
-
"DENVR: mistralai/Mixtral-8x7B-Instruct-v0.1": "https://api.inference.denvrdata.com/v1/
|
12 |
-
"DENVR: tiiuae/Falcon3-7B-Instruct": "https://api.inference.denvrdata.com/v1/
|
13 |
-
"DENVR: tiiuae/Falcon3-10B-Instruct": "https://api.inference.denvrdata.com/v1/
|
14 |
-
"DENVR: tiiuae/Falcon3.1-74B-Instruct": "https://api.inference.denvrdata.com/v1/
|
15 |
-
"DENVR: ALLaM/ALLaM-7B-Instruct-preview": "https://api.inference.denvrdata.com/v1/
|
16 |
-
"DENVR: inceptionai/jais-adapted-70b-chat": "https://api.inference.denvrdata.com/v1/
|
17 |
-
"DENVR: codellama/CodeLlama-34b-Instruct-hf": "https://api.inference.denvrdata.com/v1/
|
18 |
}
|
|
|
1 |
{
|
2 |
+
"DENVR: meta-llama/Llama-3.3-70B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
3 |
+
"DENVR: meta-llama/Meta-Llama-3.2-1B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
4 |
+
"DENVR: meta-llama/Meta-Llama-3.2-3B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
5 |
+
"DENVR: meta-llama/Meta-Llama-3.1-8B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
6 |
+
"DENVR: meta-llama/Meta-Llama-3.1-70B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
7 |
+
"DENVR: deepseek-ai/DeepSeek-R1-Distill-Llama-8B": "https://api.inference.denvrdata.com/v1/",
|
8 |
+
"DENVR: deepseek-ai/DeepSeek-R1-Distill-Llama-70B": "https://api.inference.denvrdata.com/v1/",
|
9 |
+
"DENVR: mistralai/Mistral-7B-Instruct-v0.2": "https://api.inference.denvrdata.com/v1/",
|
10 |
+
"DENVR: mistralai/Mistral-7B-Instruct-v0.1": "https://api.inference.denvrdata.com/v1/",
|
11 |
+
"DENVR: mistralai/Mixtral-8x7B-Instruct-v0.1": "https://api.inference.denvrdata.com/v1/",
|
12 |
+
"DENVR: tiiuae/Falcon3-7B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
13 |
+
"DENVR: tiiuae/Falcon3-10B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
14 |
+
"DENVR: tiiuae/Falcon3.1-74B-Instruct": "https://api.inference.denvrdata.com/v1/",
|
15 |
+
"DENVR: ALLaM/ALLaM-7B-Instruct-preview": "https://api.inference.denvrdata.com/v1/",
|
16 |
+
"DENVR: inceptionai/jais-adapted-70b-chat": "https://api.inference.denvrdata.com/v1/",
|
17 |
+
"DENVR: codellama/CodeLlama-34b-Instruct-hf": "https://api.inference.denvrdata.com/v1/"
|
18 |
}
|