Spaces:
Runtime error
Runtime error
Download app.py from NeuralJunkie/MathAid.Live: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/spaces/NeuralJunkie/MathAid.Live/resolve/main/app.py
- Command line
-
hf download hf://spaces/NeuralJunkie/MathAid.Live/app.py
-
curl -L -o app.py https://huggingface.co/spaces/NeuralJunkie/MathAid.Live/resolve/main/app.py
578 Bytes
| import gradio as gr | |
| import wolframalpha | |
| app = gr.App(title="Math Teacher", description="A simple math teacher that can help you solve math problems.") | |
| def solve_math_problem(math_problem): | |
| """Solve a math problem using Wolfram Alpha.""" | |
| app_id = "" # Your Wolfram Alpha App ID token here | |
| client = wolframalpha.Client(app_id) | |
| try: | |
| result = client.query(math_problem) | |
| return result.pods[0].text | |
| except Exception: | |
| return "Sorry, I couldn't solve your math problem." | |
| app.launch() | |