cetinca commited on
Commit
e606e90
1 Parent(s): 7ff1fe0

Update URLs

Browse files
scripts/api_scaling.py CHANGED
@@ -11,7 +11,7 @@ NUMBER_OF_CALLS = 1
11
 
12
  headers = {"Content-Type": "application/json; charset=utf-8"}
13
 
14
- # base_url = "https://tangibleai-mathtext.hf.space/run/{endpoint}"
15
  base_url = "http://localhost:7860/run/{endpoint}"
16
 
17
  data_list_1 = {
 
11
 
12
  headers = {"Content-Type": "application/json; charset=utf-8"}
13
 
14
+ # base_url = "https://tangibleai-mathtext-fastapi.hf.space/{endpoint}"
15
  base_url = "http://localhost:7860/run/{endpoint}"
16
 
17
  data_list_1 = {
scripts/api_scaling.sh CHANGED
@@ -49,7 +49,7 @@ simulate_student() {
49
 
50
  start_=$(date +"%F %T.%6N")
51
 
52
- url="https://tangibleai-mathtext.hf.space/run/$3"
53
  response=$(curl --silent --connect-timeout 30 --max-time 30 -X POST "$url" -H 'Content-Type: application/json' -d "$data")
54
 
55
  if [[ "$response" == *"Time-out"* ]]; then
 
49
 
50
  start_=$(date +"%F %T.%6N")
51
 
52
+ url="https://tangibleai-mathtext-fastapi.hf.space/$3"
53
  response=$(curl --silent --connect-timeout 30 --max-time 30 -X POST "$url" -H 'Content-Type: application/json' -d "$data")
54
 
55
  if [[ "$response" == *"Time-out"* ]]; then
scripts/make_request.py CHANGED
@@ -1,13 +1,13 @@
1
  import requests
2
 
3
  request = requests.post(url=
4
- 'https://cetinca-fastapi-ep.hf.space/sentiment-analysis',
5
  json={"content": "I reject it"}).json()
6
 
7
  print(request)
8
 
9
  request = requests.post(url=
10
- 'https://cetinca-fastapi-ep.hf.space/text2int',
11
  json={"content": "seven thousand nine hundred fifty seven"}
12
  ).json()
13
 
 
1
  import requests
2
 
3
  request = requests.post(url=
4
+ 'https://tangibleai-mathtext-fastapi.hf.space/sentiment-analysis',
5
  json={"content": "I reject it"}).json()
6
 
7
  print(request)
8
 
9
  request = requests.post(url=
10
+ 'https://tangibleai-mathtext-fastapi.hf.space/text2int',
11
  json={"content": "seven thousand nine hundred fifty seven"}
12
  ).json()
13
 
scripts/make_request.sh CHANGED
@@ -1,5 +1,5 @@
1
  #root_url="localhost:7860"
2
- root_url="https://cetinca-fastapi-ep.hf.space"
3
 
4
  ep="/"
5
  url=$root_url$ep
@@ -12,8 +12,6 @@ echo "Data: $data"
12
  echo "Response: $response"
13
  echo
14
 
15
- sleep 0.1
16
-
17
  ep="/hello"
18
  url=$root_url$ep
19
  data='{"content":"Rori"}'
@@ -25,8 +23,6 @@ echo "Data: $data"
25
  echo "Response: $response"
26
  echo
27
 
28
- sleep 0.5
29
-
30
  ep="/sentiment-analysis"
31
  url=$root_url$ep
32
  data='{"content":"I am happy with it!"}'
@@ -38,8 +34,6 @@ echo "Data: $data"
38
  echo "Response: $response"
39
  echo
40
 
41
- sleep 0.5
42
-
43
  ep="/text2int"
44
  url=$root_url$ep
45
  data='{"content":"one hundred forty two"}'
 
1
  #root_url="localhost:7860"
2
+ root_url="https://tangibleai-mathtext-fastapi.hf.space"
3
 
4
  ep="/"
5
  url=$root_url$ep
 
12
  echo "Response: $response"
13
  echo
14
 
 
 
15
  ep="/hello"
16
  url=$root_url$ep
17
  data='{"content":"Rori"}'
 
23
  echo "Response: $response"
24
  echo
25
 
 
 
26
  ep="/sentiment-analysis"
27
  url=$root_url$ep
28
  data='{"content":"I am happy with it!"}'
 
34
  echo "Response: $response"
35
  echo
36
 
 
 
37
  ep="/text2int"
38
  url=$root_url$ep
39
  data='{"content":"one hundred forty two"}'