Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,14 +23,11 @@ The system selected: {base}
|
|
| 23 |
|
| 24 |
Explain why this is the best recipient in 2-3 lines.
|
| 25 |
"""
|
| 26 |
-
try:
|
| 27 |
response = client.chat.completions.create(
|
| 28 |
model="llama-2-7b-chat",
|
| 29 |
messages=[{"role": "user", "content": prompt}]
|
| 30 |
)
|
| 31 |
explanation = response.choices[0].message.content
|
| 32 |
-
except:
|
| 33 |
-
explanation = "❌ AI explanation not available."
|
| 34 |
|
| 35 |
return f"✅ Recommended: {base}\n\n🤖 AI Reasoning:\n{explanation}"
|
| 36 |
|
|
|
|
| 23 |
|
| 24 |
Explain why this is the best recipient in 2-3 lines.
|
| 25 |
"""
|
|
|
|
| 26 |
response = client.chat.completions.create(
|
| 27 |
model="llama-2-7b-chat",
|
| 28 |
messages=[{"role": "user", "content": prompt}]
|
| 29 |
)
|
| 30 |
explanation = response.choices[0].message.content
|
|
|
|
|
|
|
| 31 |
|
| 32 |
return f"✅ Recommended: {base}\n\n🤖 AI Reasoning:\n{explanation}"
|
| 33 |
|