Aqdas commited on
Commit
7c185a8
·
1 Parent(s): 3cf3527

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import os
3
+ from assistant_api import MathTutor
4
+
5
+ tutor = MathTutor()
6
+ st.title("Assistant API > Math Tutor")
7
+ if st.text_input('Please Enter the access code') == os.environ['password']:
8
+
9
+ user_input = st.text_input('What math problem do you have, please tell me.')
10
+
11
+ with st.spinner('Sit back and relax. Let me think for a while'):
12
+ if st.button('Give Me Solution'):
13
+ if user_input:
14
+ answer = tutor.ask_user(user_input)
15
+ st.write(answer)