File size: 952 Bytes
46f5320
c10d55e
46f5320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#root_url="localhost:7860"
root_url="https://tangibleai-mathtext-fastapi.hf.space"

ep="/"
url=$root_url$ep
data=''

response=$(curl --silent -X GET "$url" -H 'Content-Type: application/json')

echo "URL: $url"
echo "Data: $data"
echo "Response: $response"
echo

ep="/hello"
url=$root_url$ep
data='{"content":"Rori"}'

response=$(curl --silent -X POST "$url" -H 'Content-Type: application/json' -d "$data")

echo "URL: $url"
echo "Data: $data"
echo "Response: $response"
echo

ep="/sentiment-analysis"
url=$root_url$ep
data='{"content":"I am happy with it!"}'

response=$(curl --silent -X POST "$url" -H 'Content-Type: application/json' -d "$data")

echo "URL: $url"
echo "Data: $data"
echo "Response: $response"
echo

ep="/text2int"
url=$root_url$ep
data='{"content":"one hundred forty two"}'

response=$(curl --silent -X POST "$url" -H 'Content-Type: application/json' -d "$data")

echo "URL: $url"
echo "Data: $data"
echo "Response: $response"
echo