bigghuggs commited on
Commit
7b5b579
·
verified ·
1 Parent(s): 3760045

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -616,9 +616,10 @@ def updateItemDisplay(seshid, budget=False):
616
  start = time.time()
617
  responses = asyncio.run(main(urls))
618
  rgbs = [getMostUsedColorsRGB(r) for r in responses]
 
619
 
620
  url = 'https://dreamdemo.pythonanywhere.com/rgb'
621
- valid_data = {'rgbs':rgbs}
622
  headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
623
  r = requests.post(url, data=json.dumps(valid_data), headers=headers)
624
  jsondata = json.loads(r.content)
 
616
  start = time.time()
617
  responses = asyncio.run(main(urls))
618
  rgbs = [getMostUsedColorsRGB(r) for r in responses]
619
+ pallete_rgb = list(set([tuple([int(val) for val in rgb]) for row in sesh.Palette_img for rgb in row]))
620
 
621
  url = 'https://dreamdemo.pythonanywhere.com/rgb'
622
+ valid_data = {'rgbs':rgbs, 'pallete_rgb':pallete_rgb}
623
  headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
624
  r = requests.post(url, data=json.dumps(valid_data), headers=headers)
625
  jsondata = json.loads(r.content)