Skip to content

Commit

Permalink
final tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitamounier committed Nov 29, 2022
1 parent f879bba commit 4a4af9a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
Binary file modified db.sqlite3
Binary file not shown.
Binary file modified faceai/__pycache__/views.cpython-310.pyc
Binary file not shown.
8 changes: 5 additions & 3 deletions faceai/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,18 @@ def aiRequest():
'Authorization': 'Bearer sd_wyFzfXmVBY9Bo5i7AfGvHjJR6MQgAW',
}

files = [
data = [
('tune[callback]', (None, 'http://127.0.0.1:8000/loading')),
('tune[title]', (None, 'my portrait')),
('tune[branch]', (None,'')),
('tune[name]', (None, 'man')),
] + [('tune[images][]', (None, open(settings.MEDIA_ROOT[:-6] + image.image.url, 'rb'))) for image in RequestImage.objects.all()]
]

files = [('tune[images][]', (None, open(settings.MEDIA_ROOT[:-6] + image.image.url, 'rb'))) for image in RequestImage.objects.all()]



response = requests.post('https://api.astria.ai/tunes', headers=headers, data=files)
response = requests.post('https://api.astria.ai/tunes', headers=headers, data=data, files=files)
# check if the response was successful
if response.status_code == 200:
print(response.status_code, response.json())
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4a4af9a

Please sign in to comment.