bigghuggs commited on
Commit
d94e6ef
·
verified ·
1 Parent(s): bdf0c45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1771,13 +1771,13 @@ def selectScript(evt: gr.SelectData, seshid):
1771
  format = evt.value
1772
  #frmt_id_maps[formats[i]]
1773
  url = 'https://dreamdemo.pythonanywhere.com/query_textgen'
1774
- item_locator_data = [tuple(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']]
1775
  valid_data = {'item_locator_data': item_locator_data}
1776
- valid_data = {'seshid':seshid, 'formatid': frmt_id_maps[format]}
1777
  headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
1778
  r = requests.post(url, data=json.dumps(valid_data), headers=headers)
1779
  jsondata = json.loads(r.content)
1780
- print('selectScript: ', jsondata)
1781
  #return sesh.scripts[script]
1782
  return 'sesh.scripts[script]'
1783
 
 
1771
  format = evt.value
1772
  #frmt_id_maps[formats[i]]
1773
  url = 'https://dreamdemo.pythonanywhere.com/query_textgen'
1774
+ #item_locator_data = [tuple(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']]
1775
  valid_data = {'item_locator_data': item_locator_data}
1776
+ valid_data = {'seshid':seshid, 'genuid': frmt_id_maps[format]}
1777
  headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
1778
  r = requests.post(url, data=json.dumps(valid_data), headers=headers)
1779
  jsondata = json.loads(r.content)
1780
+ print('selectScript: ', format, jsondata)
1781
  #return sesh.scripts[script]
1782
  return 'sesh.scripts[script]'
1783