from sftp import SpanPredictor predictor = SpanPredictor.from_path( # '/home/gqin2/public/release/sftp/0.0.1/framenet/model.tar.gz', # For CLSP grid "../model.mod.tar.gz", # For BRTX cuda_device=-1 # Change this to 0 for CUDA:0 ) while True: sentence = input(">>>") result = predictor.predict_sentence(sentence) for child in result.span: print(child) for sub_child in child: print("\t", sub_child)