Benjamin Consolvo commited on
Commit
9b98cf2
·
1 Parent(s): 39da07a

endpoints update

Browse files
Files changed (2) hide show
  1. app.py +4 -3
  2. 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 = endpoint
 
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/meta-llama/Llama-3.3-70B-Instruct",
3
- "DENVR: meta-llama/Meta-Llama-3.2-1B-Instruct": "https://api.inference.denvrdata.com/v1/meta-llama/Meta-Llama-3.2-1B-Instruct",
4
- "DENVR: meta-llama/Meta-Llama-3.2-3B-Instruct": "https://api.inference.denvrdata.com/v1/meta-llama/Meta-Llama-3.2-3B-Instruct",
5
- "DENVR: meta-llama/Meta-Llama-3.1-8B-Instruct": "https://api.inference.denvrdata.com/v1/meta-llama/Meta-Llama-3.1-8B-Instruct",
6
- "DENVR: meta-llama/Meta-Llama-3.1-70B-Instruct": "https://api.inference.denvrdata.com/v1/meta-llama/Meta-Llama-3.1-70B-Instruct",
7
- "DENVR: deepseek-ai/DeepSeek-R1-Distill-Llama-8B": "https://api.inference.denvrdata.com/v1/deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
8
- "DENVR: deepseek-ai/DeepSeek-R1-Distill-Llama-70B": "https://api.inference.denvrdata.com/v1/deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
9
- "DENVR: mistralai/Mistral-7B-Instruct-v0.2": "https://api.inference.denvrdata.com/v1/mistralai/Mistral-7B-Instruct-v0.2",
10
- "DENVR: mistralai/Mistral-7B-Instruct-v0.1": "https://api.inference.denvrdata.com/v1/mistralai/Mistral-7B-Instruct-v0.1",
11
- "DENVR: mistralai/Mixtral-8x7B-Instruct-v0.1": "https://api.inference.denvrdata.com/v1/mistralai/Mixtral-8x7B-Instruct-v0.1",
12
- "DENVR: tiiuae/Falcon3-7B-Instruct": "https://api.inference.denvrdata.com/v1/tiiuae/Falcon3-7B-Instruct",
13
- "DENVR: tiiuae/Falcon3-10B-Instruct": "https://api.inference.denvrdata.com/v1/tiiuae/Falcon3-10B-Instruct",
14
- "DENVR: tiiuae/Falcon3.1-74B-Instruct": "https://api.inference.denvrdata.com/v1/tiiuae/Falcon3.1-74B-Instruct/",
15
- "DENVR: ALLaM/ALLaM-7B-Instruct-preview": "https://api.inference.denvrdata.com/v1/ALLaM/ALLaM-7B-Instruct-preview",
16
- "DENVR: inceptionai/jais-adapted-70b-chat": "https://api.inference.denvrdata.com/v1/inceptionai/jais-adapted-70b-chat",
17
- "DENVR: codellama/CodeLlama-34b-Instruct-hf": "https://api.inference.denvrdata.com/v1/codellama/CodeLlama-34b-Instruct-hf"
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
  }