StoryAI / app.py
Youssefk's picture
Update app.py
21fe8f4
raw
history blame
2.6 kB
import streamlit as st
from streamlit_chat import message
import requests
st.set_page_config(
page_title="SAI",
page_icon=":robot:"
)
st.header("Hello - Welcome to SAI")
st.write("""The Phantom Thief Kid sends a heist notice, warning of another heist. The police deduce that his next target is a recently discovered Fabergé egg, which Suzuki Modern Art Museum in Osaka will display on August 22. The night of the heist, Kid steals the egg and flies off, and Conan and Heiji give chase. However, in the middle of the chase, an unknown assailant shoots Kid in the right eye, and Kid apparently falls into the sea to his death. After recovering the egg, the police fruitlessly search for Kid's body.
The next day, Conan, Ran, and Kogoro board a boat to Tokyo. They meet Natsumi Kousaka, whose great-grandfather worked in Fabergé's factory. She shows them a part of a sketch of two eggs and a key, which were found among her late grandmother's mementos. Conan suspects that the person who shot Kid is on the ship. That night, Ryu Sagawa, a freelance photographer covering the press with news of the egg, is murdered, shot in the right eye in the same fashion as Kid. Soon after his body is discovered, Inspector Megure, along with officers Takagi and Shiratori, arrive by helicopter to inspect the crime scene. At first, they suspect Sonoko's father's servant, Mr. Nishino, but the police and Conan conclude the culprit is Scorpion - a mysterious killer who always shoots his victims in the right eye. A missing lifeboat hints that Scorpion has escaped, and the boat's passengers go to Yokosuka Castle, which holds Scorpion's next target: the second egg.
While exploring the castle, the group stumbles across secret passages beneath the castle. As they traverse the tunnels, Inui, an art dealer, pursues a shadowy figure he sees in one of the tunnels, and is shot by a silenced handgun. Delving farther into the tunnel, they find a coffin with a corpse clutching the second egg. Suddenly, the two eggs are snatched away.
""")
if 'generated' not in st.session_state:
st.session_state['generated'] = []
if 'past' not in st.session_state:
st.session_state['past'] = []
def get_text():
input_text = st.text_input("You: "," ", key="input")
return input_text
if st.session_state['generated']:
for i in range(len(st.session_state['generated'])-1, -1, -1):
message(st.session_state["generated"][i], key=str(i))
message(st.session_state['past'][i], is_user=True, key=str(i) + '_user')
message("Tell me what happened?",is_user=True)
user_input = get_text()