File size: 528 Bytes
3b82dc1
 
 
 
3609b3f
3b82dc1
3a7b96f
3b82dc1
 
 
3a7b96f
3b82dc1
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# a little trick to avoid getting stuck on Starting
python -m http.server 7860 & kill $!
python space_checker.py &

TARGET_URL=$TARGET_URL

cat << EOF
This is a transparent proxy server.
TARGET_URL should be the endpoint of the API you are accessing, similar to [https://api.cohere.com].
SPACE_URL is the direct domain of your Space, similar to [username-space-name.hf.space]。
To confirm, you MUST set the Space to public and then click [...] - [Embed this Space].
EOF

./glider -listen :7860 -forward $TARGET_URL