kobakhit commited on
Commit
fdb4c0a
1 Parent(s): e583293
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -31,8 +31,12 @@ st.set_page_config(
31
  )
32
 
33
  # Set your OpenAI, Hugging Face API keys
34
- openai.api_key = st.secrets['openai']
35
- hf_api_key = st.secrets['hf']
 
 
 
 
36
 
37
  TRANSCRIPTION_REQUEST_LIMIT = 550
38
  PROMPT_REQUEST_LIMIT = 20
 
31
  )
32
 
33
  # Set your OpenAI, Hugging Face API keys
34
+ try:
35
+ openai.api_key = st.secrets['openai']
36
+ hf_api_key = st.secrets['hf']
37
+ except Exception:
38
+ openai.api_key = os.getenv['openai']
39
+ hf_api_key = os.getenv['hf']
40
 
41
  TRANSCRIPTION_REQUEST_LIMIT = 550
42
  PROMPT_REQUEST_LIMIT = 20