genai_fiction_summary
1.0.0
포괄적인 문서 분석 및 요약을 위해 생성 AI의 성능을 활용해 보세요. 자세한 내용은 긴 문서 통찰력 익히기: Amazon Bedrock 및 Anthropic Claude 2 기초 모델을 사용한 고급 요약 블로그 게시물을 참조하세요.
다음 Jupyter Notebook에는 블로그 게시물과 동영상에 포함된 모든 예제가 있습니다: long_text_summarization_v1.ipynb. 최신 버전의 노트북인 long_text_summarization_v2.ipynb도 사용할 수 있습니다.
스크립트는 노트북 이전에 작성되었습니다. 노트북이 최신 버전입니다.
python3 -m pip install virtualenv
virtualenv summarize
python3 -m venv summarize
source summarize/bin/activate
python3 -m pip install -r requirements.txt -Uq
cd older_scripts/
python ./book_summary_05_character.py
2023-10-28 08:29:15,761 - utilities - INFO - Response body: {'completion': ' Here is a single-paragraph description of Count Dracula:nnCount Dracula is an ancient vampire of nobility from the remote mountains of Transylvania who resides alone in a decaying yet magnificent castle. He initially appears charming and welcoming but gradually reveals his true sinister and threatening nature. With his gaunt figure, waxen skin, high aquiline nose, pointed ears, sharp teeth and burning red eyes, Dracula exhibits a mysterious magnetism and power over humans, able to control animals and the weather. He attacks the innocent Jonathan Harker, later turning Lucy Westenra into a vampire. Persistent in his vampiric evil, Dracula possesses supernatural abilities and cunning intelligence, escaping capture multiple times. Though eloquent and refined on the surface, at his core Dracula is a ruthless predator who spreads his undead curse, requiring the combined efforts of Dr. Van Helsing and his allies to finally defeat him.', 'stop_reason': 'stop_sequence'}
2023-10-28 14:57:05,196 - utilities - INFO - Response body: {'completion': ' Here are 3 examples of character types from the chapter:nnProtagonist - Jonathan Harker: The main protagonist. Struggles against Dracula and tries to protect his wife Mina.nnAntagonist - Count Dracula: The main antagonist. A vampire who attacks Mina and opposes the protagonists. nnConfidant - Dr. Van Helsing: Acts as a mentor and confidant to the protagonists, guiding them in their fight against Dracula with his knowledge.', 'stop_reason': 'stop_sequence'}
2023-10-28 13:01:27,380 - utilities - INFO - Response body: {'completion': ' Here are 2-3 examples of literary devices found in the chapter:nn[Foreshadowing]: The howling of the dogs and wolves foreshadows impending danger and builds suspense. The driver's comment "For the dead travel fast" also foreshadows supernatural events to come.nn[Imagery]: Vivid imagery is used throughout to describe the scenery, people, and events, such as "the green grass under the trees spangled with the fallen petals". This helps create a rich, immersive setting.nn[Personification]: The mountains and cliffs are described as frowning down on the travelers, giving human traits to the landscape. This helps create an ominous, threatening mood.', 'stop_reason': 'stop_sequence'}