File size: 527 Bytes
7c185a8
 
 
 
 
0cb5ab2
7c185a8
 
911f79f
7c185a8
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)