INNER CODE UNIT · Python

render_playground

hyperonym/basaran · basaran/__main__.py:108

def render_playground():
    """Render model playground."""
    if SERVER_NO_PLAYGROUND:
        abort(404)
    return render_template("playground.html", model=SERVER_MODEL_NAME)


@app.route("/v1/models")
def list_models():
    """List the currently available models."""
    info = {"id": SERVER_MODEL_NAME, "object": "model"}
    return jsonify(data=[info], object="list")


@app.route("/v1/models/<path:name>")
def retrieve_model(name):
    """Retrieve basic information about the model."""
    if name != SERVER_MODEL_NAME:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…