|
|
|
SESSION_ID=$(curl -s -X POST https://adyen-executor.hf.space/create_session | yq -r '.session_id') |
|
echo "Created session: $SESSION_ID" |
|
|
|
|
|
curl -X POST https://adyen-executor.hf.space/execute/$SESSION_ID \ |
|
-H "Content-Type: application/json" \ |
|
-d '{"code": "x = 42\nprint(f\"The value is {x}\")"}' |
|
|
|
|
|
curl -X POST https://adyen-executor.hf.space/execute/$SESSION_ID \ |
|
-H "Content-Type: application/json" \ |
|
-d '{"code": "print(f\"x is still {x}\")"}' |
|
|
|
|
|
curl https://adyen-executor.hf.space/list_sessions |
|
|
|
|
|
curl -X POST https://adyen-executor.hf.space/shutdown/$SESSION_ID |