#use this code import streamlit as st from ns_updyoga import yg_assistant st.title('Yogic Health Assistant :man_in_lotus_position:') # Create a text input box for the OpenAI key openai_key = st.text_input('Enter your OpenAI Key', type='password') query = st.text_input('Enter your query', type='default') submit = st.button('Submit') if submit: if query and openai_key: try: with st.spinner('Processing your query...'): response = yg_assistant(openai_key,query) st.write(response) except Exception as e: st.error(f'An error occurred: {e}',icon=':no_entry_sign:') else: st.error('Please enter your OpenAI key and Query both!',icon="🚨")