from utils import llama32, stream_response, disp_image, img2base64
from utils import llama32pi, rs4llama, merge_images, llama32opi, ocr_reprompt, ollamapi, inollama
from fastcore.all import *
import pathlib
import PIL
= "images/001.jpeg"; img_loc img_loc
'images/001.jpeg'
disp_image(img_loc)
= ("Describe the design, style, color, material and other"
question " aspects of the fireplace in this photo. Then list all"
" the objects in the photo")
question
'Describe the design, style, color, material and other aspects of the fireplace in this photo. Then list all the objects in the photo'
= llama32pi(question, image_url=img_loc); result result
<<Streaming response>>
The fireplace is a modern electric firebox with an LED lit flame that appears realistic and fiery without being dangerous to children or pets.
- Black frame and trim
- Rectangular shape
- Large viewing area for a dramatic, realistic effect
- Sleek design blends into the room
Other Objects in the Photo
- White couch
- Coffee table
- Vase with white flowers
- Rug on floor
- Chandelier hanging from ceiling
- Table lamp
- Floor lamp
- Bookshelf
- Window to right of fireplace
- Door to left of fireplace
'The fireplace is a modern electric firebox with an LED lit flame that appears realistic and fiery without being dangerous to children or pets.\n\n* Black frame and trim\n* Rectangular shape\n* Large viewing area for a dramatic, realistic effect\n* Sleek design blends into the room\n\n**Other Objects in the Photo**\n\n1. White couch\n2. Coffee table\n3. Vase with white flowers\n4. Rug on floor\n5. Chandelier hanging from ceiling\n6. Table lamp\n7. Floor lamp\n8. Bookshelf\n9. Window to right of fireplace\n10. Door to left of fireplace'
= ("How many balls and vases are these? Which one is closer"
new_question " to the fireplace: the balls or the vases?"); new_question
'How many balls and vases are these? Which one is closer to the fireplace: the balls or the vases?'
= ocr_reprompt(question, new_question, None, img_loc, resp_i=result); result2 result2
<<Streaming response>>
"Upon re-examining the image, I notice that there are actually two balls and one vase. The balls appear to be white and spherical in shape, while the vase has a cylindrical body with a rounded top.\n\nAs for which object is closer to the fireplace, it appears that both the balls and the vase are roughly equidistant from the fireplace. However, if I had to make an educated guess based on the image, I would say that the balls are slightly closer to the fireplace than the vase.\n\nIt's worth noting that the image quality is not ideal, and it can be difficult to discern details at times. Therefore, my observations may not be entirely accurate."
print(result2)
Upon re-examining the image, I notice that there are actually two balls and one vase. The balls appear to be white and spherical in shape, while the vase has a cylindrical body with a rounded top.
As for which object is closer to the fireplace, it appears that both the balls and the vase are roughly equidistant from the fireplace. However, if I had to make an educated guess based on the image, I would say that the balls are slightly closer to the fireplace than the vase.
It's worth noting that the image quality is not ideal, and it can be difficult to discern details at times. Therefore, my observations may not be entirely accurate.