
381
15
장
챗봇
context_sentence = story[-1]
continue
else:
story.append(sentence)
context_sentence = sentence
print('\n'.join(story))
print('exiting...')
스크립트를 실행해보자. 필자는 스크립트를 사용하여 제안 내용을 읽고 그 요소를 가져와서 다
음 줄을 추가할 것이다. 더 복잡한 모델은 편집하고 추가할 수 있는 문장을 만들 수 있겠지만
이러한 모델은 그렇게 많지 않다.
%run fairywriter.py
Let's write a story!
Give me a title ("quit" or "q" to quit) The Wolf Goes Home
finish,f | back,b | quit,q
Suggestion: >>>>>>>>> and when they had walked for the time , and
the king ' s son seated himself on the leg , and said , " i will go to
church , and you shall be have lost my life ??? ###
Sentence: There was once a prince who got lost in the woods on the way ...