Download api/auth.py from Trkaga/King: direct link, hf CLI and curl.
- Browser
- Download file 276 Bytes
-
https://huggingface.co/spaces/Trkaga/King/resolve/main/api/auth.py
- Command line
-
hf download hf://spaces/Trkaga/King/api/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/Trkaga/King/resolve/main/api/auth.py
276 Bytes
| from flask import request, jsonify | |
| users = {} | |
| def register(): | |
| data = request.json | |
| email = data["email"] | |
| password = data["password"] | |
| users[email] = { | |
| "password": password, | |
| "credits": 5 | |
| } | |
| return jsonify({"status": "ok", "credits": 5}) |