Transformers
Inference Endpoints
pantat88 commited on
Commit
a5dbc22
·
verified ·
1 Parent(s): 395d887

Delete flared.py

Browse files
Files changed (1) hide show
  1. flared.py +0 -41
flared.py DELETED
@@ -1,41 +0,0 @@
1
- import subprocess, sys, os, logging, time, re
2
- from pathlib import Path
3
- from IPython import get_ipython
4
-
5
- src = Path('/kaggle/working/scripts')
6
- if not src.exists():
7
- src.mkdir(parents=True, exist_ok=True)
8
-
9
- def from_cupang():
10
- scriptz = [
11
- f'curl -sLo {src}/cupang.py https://github.com/gutris1/segsmaker/raw/main/script/cupang.py',
12
- 'curl -sLo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64',
13
- 'chmod +x /usr/bin/cl'
14
- ]
15
- for url in scriptz:
16
- get_ipython().system(url)
17
-
18
- sys.path.append(str(src))
19
- time.sleep(2)
20
- from cupang import Tunnel as Alice_Zuberg
21
-
22
- log_file = Path('segsmaker.log')
23
- log_file.write_text('A1111/Forge\n')
24
- logging.basicConfig(
25
- filename=log_file,
26
- level=logging.INFO,
27
- format="{message}", style="{"
28
- )
29
-
30
- port = 7860
31
-
32
- Alice_Synthesis_Thirty = Alice_Zuberg(port)
33
- Alice_Synthesis_Thirty.logger.setLevel(logging.DEBUG)
34
- Alice_Synthesis_Thirty.add_tunnel(command=f"cl tunnel --url localhost:{port}", name="Cloudflared", pattern=r"[\w-]+\.trycloudflare\.com")
35
- Alice_Synthesis_Thirty.check_local_port=False
36
-
37
- with Alice_Synthesis_Thirty:
38
- get_ipython().system(f'/kaggle/venv/bin/python3 cloudflared.py ' + ' '.join(sys.argv[1:]))
39
-
40
- if __name__ == '__main__':
41
- from_cupang()