Spaces:
Runtime error
Runtime error
| import streamlit as st | |
| import os | |
| from assistant_api import MathTutor | |
| tutor = MathTutor() | |
| st.title("Assistant API → Math Tutor") | |
| if st.text_input('Please Enter the access code') == os.environ['password']: | |
| user_input = st.text_input('What math problem are you facing, Please tell me...') | |
| with st.spinner('Sit back and relax. Let me think for a while'): | |
| if st.button('Give Me Solution'): | |
| if user_input: | |
| answer = tutor.ask_user(user_input) | |
| st.write(answer) |