TOPIC: AI Caption Image
While creating a web app through flask for the project I am facing an issue:
When I am trying to locate the path of image entered/selected by user, I am getting an Os error when I use the backward slashes and an attribute error while using the forward slashes. There is something fishy with the slashes.
My code:
if request.method == ‘POST’ :
f = request.files[‘userfile’]
path = “./static/”+ f.filename
f.save(path)
caption = CaptionIt.caption_this_image(path)
print(caption)
Note: I am using windows 10
Error: AttributeError: ‘_thread._local’ object has no attribute ‘value’