udc_pedict.py is thowing error
abhishirk opened this issue · 1 comments
INPUT_CONTEXT = "sir iam manohar please respond eos "
POTENTIAL_RESPONSES = ["please give me one or two minutes to check this for you eos ","hi eos"," please give eos ","i have checked and see that you have contacted earlier for the same issue eos ","the replacement policy is applicable from the date of product delivered and this has crossed the sellerreplacementperiod eos hope you understand eos is there anything else that i can help you with today eos ","due to unforeseen reason your return request has been cancelled eos not to worry i have created a new return request for you eos is there anything else that i can help you with today eos ","i request you to confirm when you get that reward points eos ","sorry to keep you waiting its taking a little while to get this information eos thank you for your kind patience eos ","thank you for sharing the address eos please wait for a minute or two while i check the details eos "]
When I run udc_predict.py it gives me following error:
Context: sir iam manohar please respond eos
Traceback (most recent call last):
File "udc_predict.py", line 58, in
print("{}: {:g}".format(r, prob[0,0]))
TypeError: 'generator' object has no attribute 'getitem'
Please let me know if any other information is needed
In case anyone still has this issue, replacing line 58 with
print("{}: {:g}".format(r, next(prob)[0]))
solved it for me.