api-batch-tester / README.md
div0-space's picture
Initial import: API batch tester
c4e64ca verified
|
raw
history blame
1.6 kB

LibraxisAI / api-batch-tester

Public Gradio Space that serves the multi-lane API tester (standalone HTML) so you can compare any responses-compatible endpoints side-by-side.

How it works

  • The HTML tester is bundled as api-tester.html and rendered inside a minimal Gradio app (app.py).
  • No backend calls are proxied; the page talks directly to whichever endpoints you enter.
  • Optional basic auth protects the Space UI (recommended for private keys).

Running locally

pip install -r requirements.txt
python app.py  # opens on http://0.0.0.0:7860

Environment variables

  • GRADIO_USERNAME, GRADIO_PASSWORD – optional single-user basic auth.
  • GRADIO_AUTH – optional comma-separated list of user:pass pairs (overrides/extends the above).
  • API_TESTER_HTML – optional path to a custom HTML tester file (defaults to bundled api-tester.html).
  • PORT or GRADIO_PORT – port to bind (default 7860).

Deploying to Hugging Face Spaces

  1. Create Space: Gradio type, repository name LibraxisAI/api-batch-tester, hardware CPU Basic.
  2. Add secrets/variables in the Space settings:
    • GRADIO_USERNAME, GRADIO_PASSWORD (or GRADIO_AUTH) for UI protection.
    • Leave others empty unless you override the HTML path.
  3. Push these files to the Space repo. HF will auto-build and serve app.py.

Safety notes

  • The tester form includes an API key field; when the Space is public, advise users not to paste production secrets unless behind auth.
  • The app itself stores nothing; all calls go from the browser to the user-provided endpoints.