ashishbaberwal's picture
Gradio UI Setup
52f4870
raw
history blame contribute delete
626 Bytes
#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${1:-http://127.0.0.1:7860}"
TASK_ID="${2:-bug_detection_easy_1}"
for path in / /health /tasks /score /diagnostics; do
code=$(curl -s -o /tmp/load_test_out.json -w '%{http_code}' "$BASE_URL$path")
echo "$path -> $code"
done
curl -s -X POST "$BASE_URL/reset" -H 'content-type: application/json' -d "{\"task_id\":\"$TASK_ID\"}" >/tmp/load_test_reset.json
curl -s -X POST "$BASE_URL/step" -H 'content-type: application/json' -d '{"action":{"action_type":"approve","comments":[],"suggestions":[],"final_decision":"approved"}}' >/tmp/load_test_step.json
echo "load_test: ok"