Spaces:
Running
Running
secret
Browse files
app.py
CHANGED
@@ -31,8 +31,12 @@ st.set_page_config(
|
|
31 |
)
|
32 |
|
33 |
# Set your OpenAI, Hugging Face API keys
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
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
|