topk = sys.argv[3] will get a string type value. But in line for cdr,ppl in new_res[:topk]:, the 'topk' should be a int type.
So it should add an transform line to change the value type. This is my way:
topk = sys.argv[3]
if not isinstance(topk, int):
topk = int(topk)
In the file generate.py.
topk = sys.argv[3]
will get a string type value. But in linefor cdr,ppl in new_res[:topk]:
, the 'topk' should be a int type. So it should add an transform line to change the value type. This is my way: