prernajeet01 commited on
Commit
38c57c2
·
verified ·
1 Parent(s): a05090e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -57,8 +57,11 @@ def analyze_transaction_with_ai(transaction_data, suspicious_transactions):
57
  3. Recommended next steps for investigation
58
  """
59
 
 
 
 
60
  # Call OpenAI API
61
- response = openai.chat.completions.create(
62
  model="gpt-3.5-turbo",
63
  messages=[
64
  {"role": "system", "content": "You are a fraud detection expert helping analyze suspicious financial transactions."},
 
57
  3. Recommended next steps for investigation
58
  """
59
 
60
+ # Create an OpenAI client with the API key
61
+ client = openai.OpenAI(api_key=openai.api_key)
62
+
63
  # Call OpenAI API
64
+ response = client.chat.completions.create(
65
  model="gpt-3.5-turbo",
66
  messages=[
67
  {"role": "system", "content": "You are a fraud detection expert helping analyze suspicious financial transactions."},