jhj0517 commited on
Commit
7a4840b
·
2 Parent(s): 4eb41d7 03bdd62

Merge branch 'master' into huggingface

Browse files
docs/PROMPT_GUIDE.md CHANGED
@@ -20,7 +20,7 @@ Then you can draw a box around the child's face and **emphasize that area** with
20
 
21
  ![comb](https://github.com/jhj0517/sam2-playground/blob/master/docs/prompt_with_box_and_point_combination.png)
22
 
23
- Remember that you can't use the box and point combination prompt in SAM-2. You can only use a single combination at a time.
24
 
25
  ### Prompt with negative points
26
  You can also use **negative points** (red dots) to segment a more specific part. <br>
 
20
 
21
  ![comb](https://github.com/jhj0517/sam2-playground/blob/master/docs/prompt_with_box_and_point_combination.png)
22
 
23
+ Remember that you can't use the multiple box and point combinations prompt in SAM-2. You can only use one combination at a time.
24
 
25
  ### Prompt with negative points
26
  You can also use **negative points** (red dots) to segment a more specific part. <br>
modules/html_constants.py CHANGED
@@ -1,4 +1,4 @@
1
- DEFAULT_THEME = None
2
 
3
  HEADER = """
4
  ## [sam2-playground](https://github.com/jhj0517/sam2-playground)
 
1
+ DEFAULT_THEME = "jhj0517/smooth_slate_primary_button_color" # [jhj0517/boxy_violet_primary_button_variant, jhj0517/smooth_slate_primary_button_color ]
2
 
3
  HEADER = """
4
  ## [sam2-playground](https://github.com/jhj0517/sam2-playground)
notebooks/sam2_playground.ipynb CHANGED
@@ -43,7 +43,8 @@
43
  "cell_type": "code",
44
  "execution_count": null,
45
  "metadata": {
46
- "id": "kNbSbsctxahq"
 
47
  },
48
  "outputs": [],
49
  "source": [
@@ -68,14 +69,19 @@
68
  "\n",
69
  "#@markdown You can simply ignore this section and the default values will be used.\n",
70
  "THEME = '' #@param {type: \"string\"}\n",
 
 
71
  "\n",
72
  "arguments = \"\"\n",
73
  "if THEME:\n",
74
- " arguments += f\" --theme {THEME}\""
 
 
 
 
75
  ],
76
  "metadata": {
77
- "id": "Qosz9BFlGui3",
78
- "cellView": "form"
79
  },
80
  "execution_count": null,
81
  "outputs": []
@@ -84,15 +90,14 @@
84
  "cell_type": "code",
85
  "execution_count": null,
86
  "metadata": {
87
- "id": "PQroYRRZzQiN",
88
- "cellView": "form"
89
  },
90
  "outputs": [],
91
  "source": [
92
  "#@title #Run\n",
93
  "#@markdown Once the installation is complete, you can use public URL that is displayed.\n",
94
  "if 'arguments' in locals():\n",
95
- " !python app.py --share {arguments}\n",
96
  "else:\n",
97
  " !python app.py --share"
98
  ]
 
43
  "cell_type": "code",
44
  "execution_count": null,
45
  "metadata": {
46
+ "id": "kNbSbsctxahq",
47
+ "cellView": "form"
48
  },
49
  "outputs": [],
50
  "source": [
 
69
  "\n",
70
  "#@markdown You can simply ignore this section and the default values will be used.\n",
71
  "THEME = '' #@param {type: \"string\"}\n",
72
+ "USER_NAME = '' #@param {type: \"string\"}\n",
73
+ "PASSWORD = '' #@param {type: \"string\"}\n",
74
  "\n",
75
  "arguments = \"\"\n",
76
  "if THEME:\n",
77
+ " arguments += f\" --theme {THEME}\"\n",
78
+ "if USER_NAME:\n",
79
+ " arguments += f\" --username {USER_NAME}\"\n",
80
+ "if PASSWORD:\n",
81
+ " arguments += f\" --password {PASSWORD}\"\n"
82
  ],
83
  "metadata": {
84
+ "id": "Qosz9BFlGui3"
 
85
  },
86
  "execution_count": null,
87
  "outputs": []
 
90
  "cell_type": "code",
91
  "execution_count": null,
92
  "metadata": {
93
+ "id": "PQroYRRZzQiN"
 
94
  },
95
  "outputs": [],
96
  "source": [
97
  "#@title #Run\n",
98
  "#@markdown Once the installation is complete, you can use public URL that is displayed.\n",
99
  "if 'arguments' in locals():\n",
100
+ " !python app.py --share{arguments}\n",
101
  "else:\n",
102
  " !python app.py --share"
103
  ]