eggie5-adyen
commited on
Commit
•
97f8d30
1
Parent(s):
d7a612a
added new fees files
Browse files- download_data.sh +4 -0
- tests.sh +19 -0
download_data.sh
CHANGED
@@ -2,4 +2,8 @@
|
|
2 |
mkdir -p /app/data
|
3 |
wget -O /app/data/payments.csv https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/payments.csv
|
4 |
wget -O /app/data/manual.md https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/manual.md
|
|
|
|
|
|
|
|
|
5 |
exec "$@"
|
|
|
2 |
mkdir -p /app/data
|
3 |
wget -O /app/data/payments.csv https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/payments.csv
|
4 |
wget -O /app/data/manual.md https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/manual.md
|
5 |
+
wget -O /app/data/manual.md https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/fees.json
|
6 |
+
wget -O /app/data/manual.md https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/merchant_category_codes.csv
|
7 |
+
wget -O /app/data/manual.md https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/merchant_data.json
|
8 |
+
wget -O /app/data/manual.md https://huggingface.co/datasets/adyen/data-agents-benchmark_DS/resolve/main/v1/context/acquirer_countries.csv
|
9 |
exec "$@"
|
tests.sh
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Create a session and capture the session ID
|
2 |
+
SESSION_ID=$(curl -s -X POST https://adyen-executor.hf.space/create_session | yq -r '.session_id')
|
3 |
+
echo "Created session: $SESSION_ID"
|
4 |
+
|
5 |
+
# Execute some basic code
|
6 |
+
curl -X POST https://adyen-executor.hf.space/execute/$SESSION_ID \
|
7 |
+
-H "Content-Type: application/json" \
|
8 |
+
-d '{"code": "x = 42\nprint(f\"The value is {x}\")"}'
|
9 |
+
|
10 |
+
# Execute code that uses the previous variable
|
11 |
+
curl -X POST https://adyen-executor.hf.space/execute/$SESSION_ID \
|
12 |
+
-H "Content-Type: application/json" \
|
13 |
+
-d '{"code": "print(f\"x is still {x}\")"}'
|
14 |
+
|
15 |
+
# List sessions
|
16 |
+
curl https://adyen-executor.hf.space/list_sessions
|
17 |
+
|
18 |
+
# Shutdown the session
|
19 |
+
curl -X POST https://adyen-executor.hf.space/shutdown/$SESSION_ID
|