Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 =
|
| 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."},
|