coding-pot / Zero2Story

Zero2Story
MIT License
146 stars 18 forks source link

Plot to Story : KeyError #26

Closed jphan32 closed 1 year ago

jphan32 commented 1 year ago

{ "chapter_title": "The Young Knight: Chapter 1", "paragraphs": ["Aaron, a young knight in training at the Royal Palace, was tasked with a dangerous mission: to retrieve a stolen artifact. The artifact was a powerful sword that had been stolen from the king's treasury. If it fell into the wrong hands, it could be used for evil. Aaron knew that he had to do everything in his power to get the sword back.", "He set out on his journey, determined to succeed. He traveled to the far corners of the kingdom, facing many challenges along the way. He battled a fierce dragon, a band of bandits, and a treacherous swamp. But through it all, he never gave up.", "Finally, after many months of travel and hardship, Aaron reached his destination: the lair of the thief who had stolen the sword. He confronted the thief and demanded that he return the sword. The thief laughed at Aaron, saying that he would never give up the sword. He told Aaron that he would have to kill him to get it.", "Aaron knew that he had to fight the thief. He drew his sword and charged at the thief. The two of them fought back and forth, neither one of them able to gain an advantage. Finally, Aaron saw an opening and struck the thief down. He had defeated the thief and retrieved the sword.", "Aaron returned to the Royal Palace and presented the sword to the king. The king was so grateful that he knighted Aaron on the spot. Aaron was now a true hero.", "Actions:", "1. Aaron could decide to keep the sword for himself.", "2. Aaron could return the sword to the king.", "3. Aaron could destroy the sword." ] } Traceback (most recent call last): File "/home/admin/.cache/pypoetry/virtualenvs/zero2story-FJpsBv3C-py3.10/lib/python3.10/site-packages/gradio/queueing.py", line 388, in call_prediction output = await route_utils.call_process_api( File "/home/admin/.cache/pypoetry/virtualenvs/zero2story-FJpsBv3C-py3.10/lib/python3.10/site-packages/gradio/route_utils.py", line 216, in call_process_api output = await app.get_blocks().process_api( File "/home/admin/.cache/pypoetry/virtualenvs/zero2story-FJpsBv3C-py3.10/lib/python3.10/site-packages/gradio/blocks.py", line 1555, in process_api result = await self.call_function( File "/home/admin/.cache/pypoetry/virtualenvs/zero2story-FJpsBv3C-py3.10/lib/python3.10/site-packages/gradio/blocks.py", line 1191, in call_function prediction = await fn(processed_input) File "/home/admin/.cache/pypoetry/virtualenvs/zero2story-FJpsBv3C-py3.10/lib/python3.10/site-packages/gradio/utils.py", line 629, in async_wrapper response = await f(args, **kwargs) File "/data/Zero2Story/interfaces/plot_gen_ui.py", line 224, in first_story_gen gr.update(value=response_json["actions"][0], interactive=True), KeyError: 'actions'

Invalid key : "Actions", needed lower()

jphan32 commented 1 year ago

Already fixed