jbilcke-hf HF staff commited on
Commit
6a75af4
1 Parent(s): a040b19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +24,7 @@ from openai import OpenAI
24
  # Load Hugging Face token if needed
25
  hf_token = os.getenv("HF_TOKEN")
26
  openai_api_key = os.getenv("OPENAI_API_KEY")
27
- client = OpenAI(api_key=openai_api_key)
28
  system_prompt_t2v_path = "assets/system_prompt_t2v.txt"
29
  system_prompt_i2v_path = "assets/system_prompt_i2v.txt"
30
  with open(system_prompt_t2v_path, "r") as f:
@@ -113,6 +113,7 @@ def enhance_prompt_if_enabled(prompt, enhance_toggle, type="t2v"):
113
  ]
114
 
115
  try:
 
116
  response = client.chat.completions.create(
117
  model="gpt-4o-mini",
118
  messages=messages,
 
24
  # Load Hugging Face token if needed
25
  hf_token = os.getenv("HF_TOKEN")
26
  openai_api_key = os.getenv("OPENAI_API_KEY")
27
+
28
  system_prompt_t2v_path = "assets/system_prompt_t2v.txt"
29
  system_prompt_i2v_path = "assets/system_prompt_i2v.txt"
30
  with open(system_prompt_t2v_path, "r") as f:
 
113
  ]
114
 
115
  try:
116
+ client = OpenAI(api_key=openai_api_key)
117
  response = client.chat.completions.create(
118
  model="gpt-4o-mini",
119
  messages=messages,