import streamlit as st import subprocess import json st.title('Math Problem Solver') api_key = st.text_input("Enter your API Key:") math_problem = st.text_input("Enter your math problem:") 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.")