Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!pip install gradio
|
2 |
+
!pip install openai
|
3 |
+
!pip install PyPDF2
|
4 |
+
!pip install tiktoken
|
5 |
+
!pip install python-pptx
|
6 |
+
!apt-get install git
|
7 |
+
import gradio as gr
|
8 |
+
|
9 |
+
!git clone https://github.com/facebookresearch/segment-anything-2
|
10 |
+
%cd /content/segment-anything-2
|
11 |
+
|
12 |
+
!git checkout sam2.1
|
13 |
+
# Install the package
|
14 |
+
!pip install .
|
15 |
+
|
16 |
+
!wget -O sam2_hiera_tiny.pt "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_tiny.pt"
|
17 |
+
!wget -O sam2_hiera_small.pt "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_small.pt"
|
18 |
+
!wget -O sam2_hiera_base_plus.pt "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_base_plus.pt"
|
19 |
+
!wget -O sam2_hiera_large.pt "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_large.pt"
|