Zevin2023 commited on
Commit
a1b3bdd
1 Parent(s): f7152ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -22
app.py CHANGED
@@ -5,40 +5,38 @@ if __name__ == '__main__':
5
  os.system("pip install -e .")
6
 
7
  # Install NVM (Node Version Manager)
8
- # os.system("curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash")
9
 
10
  # # Source the appropriate shell configuration file
11
- # os.system("source ~/.bashrc") # You can change to ~/.zshrc based on your shell
12
 
13
  # # Install Node.js version 18.16.0
14
- # os.system("nvm install v18.16.0")
15
 
16
- # # Install pnpm (package manager)
17
- # os.system("curl -fsSL https://get.pnpm.io/install.sh | sh -")
18
 
19
- # # Source the shell configuration file again (for pnpm)
20
- # os.system("source ~/.bashrc") # You can change to ~/.zshrc based on your shell
21
 
22
- # # Verify if pnpm was installed correctly
23
- # os.system("pnpm --version")
24
 
25
- # Clone the Gradio BBox repository
26
- # os.system("git clone https://github.com/chencn2020/gradio-bbox.git")
 
 
27
 
28
- # # Change into the cloned repository directory
29
- # os.system("cd gradio-bbox")
30
 
31
- # # Build frontend
32
- # os.system("bash scripts/build_frontend.sh")
33
 
34
- # # Change back to the previous directory
35
- # os.system("cd ..")
36
 
37
- import subprocess
38
- import sys
39
- subprocess.check_call([sys.executable, 'pip', 'install', 'git+https://github.com/facebookresearch/segment-anything.git'])
40
- subprocess.check_call([sys.executable, 'curl', '-o', './checkpoints/sam_vit_b_01ec64.pth', 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth'])
41
- # os.system("curl -o ./checkpoints/sam_vit_b_01ec64.pth https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth")
42
 
43
  import argparse
44
  from demo.UI import Main_ui
 
5
  os.system("pip install -e .")
6
 
7
  # Install NVM (Node Version Manager)
8
+ os.system("curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash")
9
 
10
  # # Source the appropriate shell configuration file
11
+ os.system("source ~/.bashrc") # You can change to ~/.zshrc based on your shell
12
 
13
  # # Install Node.js version 18.16.0
14
+ os.system("nvm install v18.16.0")
15
 
16
+ print("nvm installed OK.")
 
17
 
18
+ # Install pnpm (package manager)
19
+ os.system("curl -fsSL https://get.pnpm.io/install.sh | sh -")
20
 
21
+ # Source the shell configuration file again (for pnpm)
22
+ os.system("source ~/.bashrc") # You can change to ~/.zshrc based on your shell
23
 
24
+ # Verify if pnpm was installed correctly
25
+ os.system("pnpm --version")
26
+
27
+ print("pnpm installed OK.")
28
 
29
+ # Clone the Gradio BBox repository
30
+ os.system("git clone https://github.com/chencn2020/gradio-bbox.git")
31
 
32
+ # Change into the cloned repository directory
33
+ os.system("cd gradio-bbox")
34
 
35
+ # Build frontend
36
+ os.system("bash scripts/build_frontend.sh")
37
 
38
+ # Change back to the previous directory
39
+ os.system("cd ..")
 
 
 
40
 
41
  import argparse
42
  from demo.UI import Main_ui