Spaces:
Sleeping
Sleeping
update state
Browse filesFiles changed (2)
- app.py+2-2
- test_api.sh+21-21
20 unmodified lines21222324252627104 unmodified lines13213313413513613713820 unmodified linesWALLET_PASSWORD = os.environ["WALLET_PASSWORD"]# tnsnames.ora μμ alias νμΈ (λ³΄ν΅ *_high)TNS_ALIAS = os.environ.get("DB_TNS_ALIAS", "musclecare_high")# Hugging Face μ€μ HF_DATA_REPO_ID = os.getenv("HF_DATA_REPO_ID")104 unmodified lineswith pool.acquire() as conn:with conn.cursor() as cur:cur.execute("""MERGE INTO MuscleCare.user_state tUSING (SELECT :user_id AS user_id FROM dual) s20 unmodified lines21222324252627104 unmodified lines13213313413513613713820 unmodified linesWALLET_PASSWORD = os.environ["WALLET_PASSWORD"]# tnsnames.ora μμ alias νμΈ (λ³΄ν΅ *_high)TNS_ALIAS = os.environ["DB_TNS_ALIAS"]# Hugging Face μ€μ HF_DATA_REPO_ID = os.getenv("HF_DATA_REPO_ID")104 unmodified lineswith pool.acquire() as conn:with conn.cursor() as cur:cur.execute("""MERGE INTO user_state tUSING (SELECT :user_id AS user_id FROM dual) s
27 unmodified lines282930313233343 unmodified lines3839404142434445464748495051525354555657585960616263646527 unmodified lines-H "Content-Type: application/json" \-H "accept: application/json" \-d '{"user_id": "test_user_001","rms_base": 0.11,"freq_base": 50.1,"user_emb": [0.135, 0.012, 49.3, 0.8, 0.84, 0.02, 0.11, 0.0021, 0.35, 0.71, 0.92, 0.88],3 unmodified linesecho ""# 3. Dataset μ λ‘λecho "3οΈβ£ Dataset μ λ‘λ"echo "--------------------------------------"curl -X POST "$BASE_URL/upload_dataset" \-H "Content-Type: application/json" \-H "accept: application/json" \-d '{"user_id": "test_user_001","rms": 0.42,"freq": 45.3,"fatigue": 0.25,"timestamp": "2024-01-15T10:30:00Z"}' | jq .echo ""echo ""# 4. μ¬μ©μ Dataset μ‘°νecho "4οΈβ£ μ¬μ©μ Dataset μ‘°ν"echo "--------------------------------------"curl -X GET "$BASE_URL/user_dataset/test_user_001" \-H "accept: application/json" | jq .echo ""echo ""echo "======================================"echo "β ν μ€νΈ μλ£"27 unmodified lines282930313233343 unmodified lines3839404142434445464748495051525354555657585960616263646527 unmodified lines-H "Content-Type: application/json" \-H "accept: application/json" \-d '{"user_id": "local_user","rms_base": 0.11,"freq_base": 50.1,"user_emb": [0.135, 0.012, 49.3, 0.8, 0.84, 0.02, 0.11, 0.0021, 0.35, 0.71, 0.92, 0.88],3 unmodified linesecho ""# 3. Dataset μ λ‘λ# echo "3οΈβ£ Dataset μ λ‘λ"# echo "--------------------------------------"# curl -X POST "$BASE_URL/upload_dataset" \# -H "Content-Type: application/json" \# -H "accept: application/json" \# -d '{# "user_id": "test_user_001",# "rms": 0.42,# "freq": 45.3,# "fatigue": 0.25,# "timestamp": "2024-01-15T10:30:00Z"# }' | jq .# echo ""# echo ""# 4. μ¬μ©μ Dataset μ‘°ν# echo "4οΈβ£ μ¬μ©μ Dataset μ‘°ν"# echo "--------------------------------------"# curl -X GET "$BASE_URL/user_dataset/test_user_001" \# -H "accept: application/json" | jq .# echo ""# echo ""echo "======================================"echo "β ν μ€νΈ μλ£"
app.py+2-2
test_api.sh+21-21