Spaces:
Running
Running
admin
commited on
Commit
·
fac96fe
1
Parent(s):
f37a5b8
add default key in env
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from openai import OpenAI
|
3 |
|
@@ -102,7 +103,7 @@ if __name__ == "__main__":
|
|
102 |
label="Select a model",
|
103 |
)
|
104 |
ds_key = gr.Textbox(
|
105 |
-
"",
|
106 |
type="password",
|
107 |
label="API key",
|
108 |
)
|
@@ -134,7 +135,7 @@ if __name__ == "__main__":
|
|
134 |
label="Select a model",
|
135 |
)
|
136 |
kimi_key = gr.Textbox(
|
137 |
-
"",
|
138 |
type="password",
|
139 |
label="API key",
|
140 |
)
|
|
|
1 |
+
import os
|
2 |
import gradio as gr
|
3 |
from openai import OpenAI
|
4 |
|
|
|
103 |
label="Select a model",
|
104 |
)
|
105 |
ds_key = gr.Textbox(
|
106 |
+
os.getenv("ds_api_key"),
|
107 |
type="password",
|
108 |
label="API key",
|
109 |
)
|
|
|
135 |
label="Select a model",
|
136 |
)
|
137 |
kimi_key = gr.Textbox(
|
138 |
+
os.getenv("kimi_api_key"),
|
139 |
type="password",
|
140 |
label="API key",
|
141 |
)
|