Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def get_recipe(recipe_name: str) -> Recipe:
|
|
81 |
"content": f"Fetch a recipe for {recipe_name}",
|
82 |
},
|
83 |
],
|
84 |
-
model="
|
85 |
temperature=0,
|
86 |
# Streaming is not supported in JSON mode
|
87 |
stream=False,
|
@@ -121,7 +121,7 @@ def Suggest_ingredient_alternatives(recipe_name: str, dietary_restrictions: str,
|
|
121 |
Allergies: {', '.join(allergies)}""",
|
122 |
},
|
123 |
],
|
124 |
-
model="
|
125 |
temperature=0,
|
126 |
# Streaming is not supported in JSON mode
|
127 |
stream=False,
|
@@ -181,7 +181,7 @@ def explain_image(base64_image):
|
|
181 |
|
182 |
}
|
183 |
],
|
184 |
-
model="llama-3.2-
|
185 |
return chat_completion.choices[0].message.content
|
186 |
|
187 |
|
@@ -228,7 +228,7 @@ def generate_recipe_name(base64_image):
|
|
228 |
}
|
229 |
],
|
230 |
response_format={"type": "json_object"},
|
231 |
-
model="llama-3.2-
|
232 |
return json.loads(chat_completion.choices[0].message.content)
|
233 |
|
234 |
|
|
|
81 |
"content": f"Fetch a recipe for {recipe_name}",
|
82 |
},
|
83 |
],
|
84 |
+
model="llama-3.2-90b-text-preview",
|
85 |
temperature=0,
|
86 |
# Streaming is not supported in JSON mode
|
87 |
stream=False,
|
|
|
121 |
Allergies: {', '.join(allergies)}""",
|
122 |
},
|
123 |
],
|
124 |
+
model="llama-3.2-90b-text-preview",
|
125 |
temperature=0,
|
126 |
# Streaming is not supported in JSON mode
|
127 |
stream=False,
|
|
|
181 |
|
182 |
}
|
183 |
],
|
184 |
+
model="llama-3.2-90b-vision-preview")
|
185 |
return chat_completion.choices[0].message.content
|
186 |
|
187 |
|
|
|
228 |
}
|
229 |
],
|
230 |
response_format={"type": "json_object"},
|
231 |
+
model="llama-3.2-90b-vision-preview")
|
232 |
return json.loads(chat_completion.choices[0].message.content)
|
233 |
|
234 |
|