CoolFace
Apppublic

Hobson/mathtext-fastapi

sourceHugging Faceagpl-3.0updated 3y agoView on Hugging Face
1likes
make_request.sh47 linesDownload Raw Back to scripts
1#root_url="localhost:7860"2root_url="https://tangibleai-mathtext-fastapi.hf.space"3 4ep="/"5url=$root_url$ep6data=''7 8response=$(curl --silent -X GET "$url" -H 'Content-Type: application/json')9 10echo "URL: $url"11echo "Data: $data"12echo "Response: $response"13echo14 15ep="/hello"16url=$root_url$ep17data='{"content":"Rori"}'18 19response=$(curl --silent -X POST "$url" -H 'Content-Type: application/json' -d "$data")20 21echo "URL: $url"22echo "Data: $data"23echo "Response: $response"24echo25 26ep="/sentiment-analysis"27url=$root_url$ep28data='{"content":"I am happy with it!"}'29 30response=$(curl --silent -X POST "$url" -H 'Content-Type: application/json' -d "$data")31 32echo "URL: $url"33echo "Data: $data"34echo "Response: $response"35echo36 37ep="/text2int"38url=$root_url$ep39data='{"content":"one hundred forty two"}'40 41response=$(curl --silent -X POST "$url" -H 'Content-Type: application/json' -d "$data")42 43echo "URL: $url"44echo "Data: $data"45echo "Response: $response"46echo47