CoolFace
Apppublic

jyothisankar/code-interpreter

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

Code Interpreter with AI Error Analysis

A FastAPI service that executes Python code and uses an LLM (via aipipe.org) to identify the line numbers where errors occur.

Endpoint

POST /code-interpreter

Request:

json
{ "code": "x = 10\ny = 0\nresult = x / y\nprint(result)" }

Response:

json
{ "error": [3], "result": "Traceback (most recent call last): ..." }
  • On success: { "error": [], "result": "<stdout>" }
  • On error: { "error": [<line numbers>], "result": "<traceback>" }

Configuration

Set the AIPIPE_TOKEN environment variable (as a Secret in the Space settings) to your token from <https://aipipe.org/login>.