Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def send_to_openai(api_key, image_file):
|
|
40 |
# Extract words from the assistant's response
|
41 |
assistant_response = response.json()['choices'][0]['message']['content']
|
42 |
words = assistant_response.split('\n')
|
43 |
-
checkresponse_lower =
|
44 |
if "leaf" in checkresponse_lower:
|
45 |
payload = {
|
46 |
"model": "gpt-4-vision-preview",
|
|
|
40 |
# Extract words from the assistant's response
|
41 |
assistant_response = response.json()['choices'][0]['message']['content']
|
42 |
words = assistant_response.split('\n')
|
43 |
+
checkresponse_lower = [word.lower() for word in words]
|
44 |
if "leaf" in checkresponse_lower:
|
45 |
payload = {
|
46 |
"model": "gpt-4-vision-preview",
|