Upload 2 files
Browse files
app.py
CHANGED
|
@@ -67,7 +67,7 @@ def predict_macros_with_explanation(img):
|
|
| 67 |
|
| 68 |
try:
|
| 69 |
response = openai.ChatCompletion.create(
|
| 70 |
-
model="gpt-
|
| 71 |
messages=[
|
| 72 |
{"role": "system", "content": "You are a helpful sports nutritionist."},
|
| 73 |
{"role": "user", "content": f"This food is {food} with macros: {macros}. Give a short explanation on how this helps a swimmer recover after training."}
|
|
@@ -114,7 +114,7 @@ def analyze_swim_video_with_gpt(video_path):
|
|
| 114 |
|
| 115 |
try:
|
| 116 |
gpt_response = openai.ChatCompletion.create(
|
| 117 |
-
model="gpt-
|
| 118 |
messages=[
|
| 119 |
{"role": "system", "content": "You are a professional swim coach."},
|
| 120 |
{"role": "user", "content": f"The following stroke issues were detected: {tips}. Explain their impact on performance and how to correct them."}
|
|
|
|
| 67 |
|
| 68 |
try:
|
| 69 |
response = openai.ChatCompletion.create(
|
| 70 |
+
model="gpt-3.5-turbo",
|
| 71 |
messages=[
|
| 72 |
{"role": "system", "content": "You are a helpful sports nutritionist."},
|
| 73 |
{"role": "user", "content": f"This food is {food} with macros: {macros}. Give a short explanation on how this helps a swimmer recover after training."}
|
|
|
|
| 114 |
|
| 115 |
try:
|
| 116 |
gpt_response = openai.ChatCompletion.create(
|
| 117 |
+
model="gpt-3.5-turbo",
|
| 118 |
messages=[
|
| 119 |
{"role": "system", "content": "You are a professional swim coach."},
|
| 120 |
{"role": "user", "content": f"The following stroke issues were detected: {tips}. Explain their impact on performance and how to correct them."}
|