nphard001 / ADL-Final

Enhanced Image Retrieval Chatbot
1 stars 0 forks source link

Polling #12

Open nphard001 opened 5 years ago

nphard001 commented 5 years ago

reply list of dic

[{'state': 'done',
  'token': 'ea8ea0b3156f49669c966bc123561220',
  'text_list': ['msg1',
   'msg2',
   None,
   'msg4',
   'msg5',
   'msg7',
   'msg8',
   'msg9',
   None,
   'ppp',
   'ppp2',
   None,
   'XD'],
  'line_userId': 'U9d6503da59b6b0d5efba3c7af7af5125'},
 {'state': 'done',
  'token': 'ea8ea0b3156f49669c966bc123561220',
  'text_list': ['msg1',
   'msg2',
   None,
   'msg4',
   'msg5',
   'msg7',
   'msg8',
   'msg9',
   None,
   'ppp',
   'ppp2',
   None,
   'XD'],
  'line_userId': 'U9d6503da59b6b0d5efba3c7af7af5125'}]
nphard001 commented 5 years ago

send reply (one reply per request)

{
  'line_userId': 'U9d6503da59b6b0d5efba3c7af7af5125',
  'img_idx': 9999, # train_im_names.txt, min=0 max=9999
}
adamlin120 commented 5 years ago

image id starts at 0

nphard001 commented 5 years ago

Example pending_list reply_index

from nphard001.api_data import *
j = HTTPJson2Json('https://linux7.csie.org:3721/data/pending_list', {})
print(json.dumps(j, indent=1))

tosend = {
    'line_userId': 'U9d6503da59b6b0d5efba3c7af7af5125',
    'img_idx': 99,
}
j = HTTPJson2Json('https://linux7.csie.org:3721/data/reply_index', tosend)
print(json.dumps(j, indent=1))
nphard001 commented 5 years ago

idx=9999 -> train_im_names.txt的最後一行

https://linux7.csie.org:3721/data/image/raw/train/9999

image