Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def process_images(msg: cl.Message):
|
|
16 |
|
17 |
# Accessing the bytes of a specific image
|
18 |
image_bytes = images[0].content # take the first image just for demo purposes
|
19 |
-
|
20 |
# check the size of the image, max 1mb
|
21 |
if len(image_bytes) > 1000000:
|
22 |
return "too_large"
|
@@ -54,8 +54,7 @@ def handle_vision_call(msg, image_history):
|
|
54 |
}
|
55 |
)
|
56 |
stream = gpt_vision_call(image_history)
|
57 |
-
|
58 |
-
image_history.clear()
|
59 |
return stream
|
60 |
|
61 |
@traceable(run_type="llm", name="gpt 3 turbo call")
|
|
|
16 |
|
17 |
# Accessing the bytes of a specific image
|
18 |
image_bytes = images[0].content # take the first image just for demo purposes
|
19 |
+
|
20 |
# check the size of the image, max 1mb
|
21 |
if len(image_bytes) > 1000000:
|
22 |
return "too_large"
|
|
|
54 |
}
|
55 |
)
|
56 |
stream = gpt_vision_call(image_history)
|
57 |
+
|
|
|
58 |
return stream
|
59 |
|
60 |
@traceable(run_type="llm", name="gpt 3 turbo call")
|