API requests not saving images

#3
by rnaisa - opened

Hi! This is the first time I've tried to use a space's API and I hope this is the right place to ask. I've been trying to get the interpolated images via requests in my python script but it complains that there are no files under the specified directory. Here's an exemplary output of the JSON I get from the request (base64 uris in the request block should be correct):

[[{'name': '/tmp/tmpa9511fqs.png', 'data': None, 'is_file': True}, {'name': '/tmp/tmpl5boh790.png', 'data': None, 'is_file': True}, {'name': '/tmp/tmppa0xklq9.png', 'data': None, 'is_file': True}, {'name': '/tmp/tmpqtsbvqfu.png', 'data': None, 'is_file': True}, {'name': '/tmp/tmpiwp8rozq.png', 'data': None, 'is_file': True}]]

Colab, Windows and Ubuntu WSL all show the same error. It seems like there's an issue with the image saving.

Is there additional information I have to specify before the requests or is there a way to access the API code? I'm not sure if this is an issue with my code or a general issue with the API of the space.

Thank you very much and kind regards!

@rnaisa I am seeing the same issue. Unfortunately there is no documentation that I could find for this. Can you try asking in the forums ?

Sign up or log in to comment