MichaelChou0806 commited on
Commit
4491b95
·
verified ·
1 Parent(s): 78d857f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -4,10 +4,10 @@ from openai import OpenAI
4
  import gradio as gr
5
 
6
  # ========================
7
- # 🔐 使用者設定區
8
  # ========================
9
- PASSWORD = "ckw2025" # ← 改成你要的登入密碼
10
- MAX_SIZE = 25 * 1024 * 1024 # 25 MB 限制
11
  client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
12
 
13
  # ========================
@@ -47,7 +47,6 @@ def transcribe_and_summarize(file):
47
  )
48
  transcripts.append(text)
49
  full_text = "\n".join(transcripts)
50
-
51
  response = client.chat.completions.create(
52
  model="gpt-4o-mini",
53
  messages=[
 
4
  import gradio as gr
5
 
6
  # ========================
7
+ # 🔐 使用者設定區(安全版本)
8
  # ========================
9
+ PASSWORD = os.getenv("APP_PASSWORD", "defaultpass")
10
+ MAX_SIZE = 25 * 1024 * 1024
11
  client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
12
 
13
  # ========================
 
47
  )
48
  transcripts.append(text)
49
  full_text = "\n".join(transcripts)
 
50
  response = client.chat.completions.create(
51
  model="gpt-4o-mini",
52
  messages=[