Update app.py
Browse files
app.py
CHANGED
|
@@ -579,7 +579,7 @@ def updateItemDisplay(seshid, budget=False, pallete_change=False):
|
|
| 579 |
responses = [r.decode('ISO-8859-1') if type(r) != type(None) else r for r in sesh.responses]
|
| 580 |
item_locator_data = [sesh.item_data_[sesh.current_img_signature][sesh.room_type][sesh.room_style][sesh.price][sesh.Palette_ids[sesh.current_img_signature]][data[1]][data[0]] for data in sesh.display_items_[sesh.current_img_signature] if data[1] not in ['Palette', 'Living Room', 'Bedroom']]
|
| 581 |
json_data = [json.dumps({'response': responses[i], 'item_locator_data': item_locator_data[i]}) for i,url in enumerate(urls)]
|
| 582 |
-
responses = asyncio.run(main_post(urls, headers, json_data, timeout
|
| 583 |
print('*-/*/-*-updateDisplay: dumped store_shop: ', item_locator_data)
|
| 584 |
|
| 585 |
formats = ['Youtube Long-Form', 'Youtube Short-Form', 'Facebook Long-Form', 'Instagram Reel', 'Tiktok', 'LinkedIn']
|
|
@@ -593,7 +593,7 @@ def updateItemDisplay(seshid, budget=False, pallete_change=False):
|
|
| 593 |
items = [[data[1] for data in sesh.display_items_[sesh.current_img_signature] if data[1] not in ['Palette', 'Living Room', 'Bedroom']] for _ in range(len(formats))]
|
| 594 |
#json_data = [json.dumps({'video_format': fmt, 'number_of_items': number_of_items[i], 'room_type': sesh.room_type, 'item_locator_data': item_locator_data, 'gen_uid': i, 'responses':responses, 'items': items}) for i,fmt in enumerate(formats)]
|
| 595 |
json_data = [json.dumps({'video_format': fmt, 'number_of_items': number_of_items[i], 'room_type': sesh.room_type, 'item_locator_data': item_locator_data[i], 'gen_uid': i, 'items': items}) for i,fmt in enumerate(formats)]
|
| 596 |
-
responses = asyncio.run(main_post(urls, headers, json_data, timeout=.
|
| 597 |
#responses = asyncio.run(main_post(urls, headers, json_data, timeout=3))
|
| 598 |
print('*-/*/-*-updateDisplay: dumped scriptgen_promise: ', responses)
|
| 599 |
|
|
|
|
| 579 |
responses = [r.decode('ISO-8859-1') if type(r) != type(None) else r for r in sesh.responses]
|
| 580 |
item_locator_data = [sesh.item_data_[sesh.current_img_signature][sesh.room_type][sesh.room_style][sesh.price][sesh.Palette_ids[sesh.current_img_signature]][data[1]][data[0]] for data in sesh.display_items_[sesh.current_img_signature] if data[1] not in ['Palette', 'Living Room', 'Bedroom']]
|
| 581 |
json_data = [json.dumps({'response': responses[i], 'item_locator_data': item_locator_data[i]}) for i,url in enumerate(urls)]
|
| 582 |
+
responses = asyncio.run(main_post(urls, headers, json_data, timeout=.5))
|
| 583 |
print('*-/*/-*-updateDisplay: dumped store_shop: ', item_locator_data)
|
| 584 |
|
| 585 |
formats = ['Youtube Long-Form', 'Youtube Short-Form', 'Facebook Long-Form', 'Instagram Reel', 'Tiktok', 'LinkedIn']
|
|
|
|
| 593 |
items = [[data[1] for data in sesh.display_items_[sesh.current_img_signature] if data[1] not in ['Palette', 'Living Room', 'Bedroom']] for _ in range(len(formats))]
|
| 594 |
#json_data = [json.dumps({'video_format': fmt, 'number_of_items': number_of_items[i], 'room_type': sesh.room_type, 'item_locator_data': item_locator_data, 'gen_uid': i, 'responses':responses, 'items': items}) for i,fmt in enumerate(formats)]
|
| 595 |
json_data = [json.dumps({'video_format': fmt, 'number_of_items': number_of_items[i], 'room_type': sesh.room_type, 'item_locator_data': item_locator_data[i], 'gen_uid': i, 'items': items}) for i,fmt in enumerate(formats)]
|
| 596 |
+
responses = asyncio.run(main_post(urls, headers, json_data, timeout=.5))
|
| 597 |
#responses = asyncio.run(main_post(urls, headers, json_data, timeout=3))
|
| 598 |
print('*-/*/-*-updateDisplay: dumped scriptgen_promise: ', responses)
|
| 599 |
|