myselfshravan commited on
Commit
5cfcb46
·
1 Parent(s): bf90bae

chore: Update API key retrieval method

Browse files

Update the method for retrieving the API key by using the `os.getenv` function instead of `st.secrets`.

Files changed (1) hide show
  1. nemo.py +2 -1
nemo.py CHANGED
@@ -4,13 +4,14 @@ import re
4
  from collections import namedtuple
5
  from sentence_transformers import SentenceTransformer, util
6
  import streamlit as st
 
7
 
8
  Level = namedtuple("Level", ["name", "description", "hint", "phrase"])
9
 
10
 
11
  class EnigmaEscape:
12
  API_ENDPOINT = "https://api.endpoints.anyscale.com/v1/chat/completions"
13
- API_KEY = st.secrets["anyscale_api"]
14
  forbids = [
15
  "replace",
16
  "swap",
 
4
  from collections import namedtuple
5
  from sentence_transformers import SentenceTransformer, util
6
  import streamlit as st
7
+ import os
8
 
9
  Level = namedtuple("Level", ["name", "description", "hint", "phrase"])
10
 
11
 
12
  class EnigmaEscape:
13
  API_ENDPOINT = "https://api.endpoints.anyscale.com/v1/chat/completions"
14
+ API_KEY = os.getenv("anyscale_api")
15
  forbids = [
16
  "replace",
17
  "swap",