Spaces:
Sleeping
Sleeping
Download call.sh from tamdang1350/test: direct link, hf CLI and curl.
- Browser
- Download file 468 Bytes
-
https://huggingface.co/spaces/tamdang1350/test/resolve/main/call.sh
- Command line
-
hf download hf://spaces/tamdang1350/test/call.sh
-
curl -L -o call.sh https://huggingface.co/spaces/tamdang1350/test/resolve/main/call.sh
468 Bytes
| # Đổi thành URL Space của bạn | |
| BASE_URL="https://tamdang1350-test.hf.space" | |
| # Dùng: ./call.sh csv myfile.csv | |
| # hoặc: ./call.sh json data.json | |
| # hoặc: ./call.sh text notes.txt | |
| TYPE=$1 | |
| FILE=$2 | |
| if [ -z "$TYPE" ] || [ -z "$FILE" ]; then | |
| echo "Usage: ./call.sh [csv|json|text] <file_path>" | |
| exit 1 | |
| fi | |
| echo "Đang gửi $FILE lên server..." | |
| curl -s -X POST "$BASE_URL/process/$TYPE" \ | |
| -F "file=@$FILE" \ | |
| | python3 -m json.tool |