seagullOk commited on
Commit
822bb79
·
verified ·
1 Parent(s): 2b40476

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -6,7 +6,10 @@ import math
6
  import tempfile
7
 
8
  # 从环境变量读取 API Key(Hugging Face Spaces 安全设置)
 
9
  openai.api_key = os.getenv("OPENAI_API_KEY")
 
 
10
 
11
  def seconds_to_srt_time(seconds: float) -> str:
12
  ms = int((seconds - int(seconds)) * 1000)
 
6
  import tempfile
7
 
8
  # 从环境变量读取 API Key(Hugging Face Spaces 安全设置)
9
+ print("程序启动,开始读取 API Key")
10
  openai.api_key = os.getenv("OPENAI_API_KEY")
11
+ print(f"读取到 API Key,长度: {len(openai.api_key) if openai.api_key else 'None'}")
12
+
13
 
14
  def seconds_to_srt_time(seconds: float) -> str:
15
  ms = int((seconds - int(seconds)) * 1000)