Spaces:
Runtime error
Runtime error
Download app.py from Aqdas/Assistant_API_Math_Tutor: direct link, hf CLI and curl.
- Browser
- Download file 522 Bytes
-
https://huggingface.co/spaces/Aqdas/Assistant_API_Math_Tutor/resolve/0cb5ab2f07533e4df37fe8d9912c32e9f2b35dcc/app.py
- Command line
-
hf download hf://spaces/Aqdas/Assistant_API_Math_Tutor@0cb5ab2f07533e4df37fe8d9912c32e9f2b35dcc/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Aqdas/Assistant_API_Math_Tutor/resolve/0cb5ab2f07533e4df37fe8d9912c32e9f2b35dcc/app.py
522 Bytes
| 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 do you have, 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) |