Spaces:
Runtime error
Runtime error
File size: 775 Bytes
86f6634 b280ffb 86f6634 38aef23 80b30f1 86f6634 d2a7787 b252803 86f6634 b280ffb 86f6634 b280ffb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import streamlit as st
import subprocess
import json
st.title('AutoGen MathChat')
st.markdown('''To learn more join https://www.meetup.com/florence-aws-user-group-meetup/''')
api_key = st.text_input("Enter your Openai API Key:",type="password")
math_problem = st.text_area("Enter your math problem:", "integrate x^2 from 0 to 5", height=100)
if st.button('Solve'):
if api_key and math_problem:
input_data = {
"math_problem": math_problem,
"api_key": api_key
}
result = subprocess.check_output(
["python", "query_solver.py"],
input=json.dumps(input_data),
text=True
)
st.write(result.strip())
else:
st.write("Please provide both API key and math problem.") |