kim368882 commited on
Commit
f5eb5d4
Β·
verified Β·
1 Parent(s): 27ff44d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -167,7 +167,7 @@ def analyze_character(lunIljin, OPENAI_API_KEY):
167
  if response.status_code == 200:
168
  data = response.json()
169
  # λŒ€ν™”ν˜• API μ‘λ‹΅μ—μ„œ μ μ ˆν•œ λ©”μ‹œμ§€ μΆ”μΆœ
170
- return data["choices"][0]["message"]["content"], get_famous_people(lunIljin)
171
  else:
172
  # 였λ₯˜ λ©”μ‹œμ§€ κ°œμ„ 
173
  return f"였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. μƒνƒœ μ½”λ“œ: {response.status_code}, λ©”μ‹œμ§€: {response.json().get('error', {}).get('message', 'Unknown error')}"
 
167
  if response.status_code == 200:
168
  data = response.json()
169
  # λŒ€ν™”ν˜• API μ‘λ‹΅μ—μ„œ μ μ ˆν•œ λ©”μ‹œμ§€ μΆ”μΆœ
170
+ return [data["choices"][0]["message"]["content"], get_famous_people(lunIljin)]
171
  else:
172
  # 였λ₯˜ λ©”μ‹œμ§€ κ°œμ„ 
173
  return f"였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. μƒνƒœ μ½”λ“œ: {response.status_code}, λ©”μ‹œμ§€: {response.json().get('error', {}).get('message', 'Unknown error')}"