fix CORS, allow images, override mapping name

This commit is contained in:
salt
2024-04-09 16:37:48 -07:00
parent cad40c6741
commit ef3c445fbc
4 changed files with 43 additions and 20 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import requests
url = 'http://localhost:8000/preview/'
payload = {"style": "comic_book", "positive_prompt": "test pos in", "negative_prompt": "test neg in"}
files = {'video': open('miku1f.mp4', 'rb')}
files = {'input_file': open('test_image.jpg', 'rb')}
response = requests.post(url, data={'request': json.dumps(payload)}, files=files) # Use 'request': payload directly
if response.status_code == 200: