youngtsai commited on
Commit
78f5c78
·
1 Parent(s): 46f5603

OPEN_AI_KEY = os.getenv("OPEN_AI_KEY")

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,8 +1,11 @@
1
  import gradio as gr
2
  import openai
 
3
 
4
  # 设置OpenAI API密钥
5
- openai.api_key = '你的OpenAI API密钥'
 
 
6
 
7
  def generate_topic_sentences(sys_content, user_content, model="gpt-4-1106-preview", max_tokens=4000):
8
  """
 
1
  import gradio as gr
2
  import openai
3
+ import os
4
 
5
  # 设置OpenAI API密钥
6
+ OPEN_AI_KEY = os.getenv("OPEN_AI_KEY")
7
+
8
+
9
 
10
  def generate_topic_sentences(sys_content, user_content, model="gpt-4-1106-preview", max_tokens=4000):
11
  """