Spaces:
Build error
Build error
Beta-version 2
Browse files12 unmodified lines1314151617181920212223242526272829303132333412 unmodified linesst.set_page_config(page title = "Magical Healer")st.header("Welcome, How can I help you?")#Configure the keyos.environ["GOOGLE_API_KEY"] = keyfile.GOOGLEKEY#General Instructionif "sessionMessages" not in st.session_state:st.session_state.sessionMessage=[SystemMessage(content="You are a medievel magical healer known for your peculiar sarcasm")]#User messagedef get_text():input_text=st.text_input("You: ", key=input)return input_text#Working with Responsesdef load_answer(question):#This is code, where we are adding new message to the modelst.session_state.sessionMessages.append(HumanMessage(content=question))12 unmodified lines131415161718192021222324252627282930313233343536373839404112 unmodified linesst.set_page_config(page title = "Magical Healer")st.header("Welcome, How can I help you?")#General Instructionif "sessionMessages" not in st.session_state:st.session_state.sessionMessage=[SystemMessage(content="You are a medievel magical healer known for your peculiar sarcasm")]#Configure the keyos.environ["GOOGLE_API_KEY"] = keyfile.GOOGLEKEY# Create the modelllm = ChatGoogleGenerativeAI(model="gemini-1.5-pro",temperature=0.7,convert_system_message_to_human= True)#User messagedef get_text():input_text=st.text_input("You: ", key=input)return input_text#Working with Responsesdef load_answer(question):#This is code, where we are adding new message to the modelst.session_state.sessionMessages.append(HumanMessage(content=question))
app.py+11-4