Spaces:
Paused
Paused
Julien Delavande
commited on
Commit
·
8119345
1
Parent(s):
7aee319
nex
Browse files- .env +125 -1
- Dockerfile.dev +2 -0
- compose.dev.yml +0 -1
.env
CHANGED
|
@@ -138,7 +138,130 @@ ALLOW_IFRAME=true # Allow the app to be embedded in an iframe
|
|
| 138 |
|
| 139 |
### Tools ###
|
| 140 |
# Check out public config in `chart/env/prod.yaml` for more details
|
| 141 |
-
TOOLS=`[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
### Rate limits ###
|
| 144 |
# See `src/lib/server/usageLimits.ts`
|
|
@@ -178,6 +301,7 @@ ADMIN_API_SECRET=# secret to admin API calls, like computing usage stats or expo
|
|
| 178 |
|
| 179 |
|
| 180 |
### Docker build variables ###
|
|
|
|
| 181 |
# These values cannot be updated at runtime
|
| 182 |
# They need to be passed when building the docker image
|
| 183 |
# See https://github.com/huggingface/chat-ui/main/.github/workflows/deploy-prod.yml#L44-L47
|
|
|
|
| 138 |
|
| 139 |
### Tools ###
|
| 140 |
# Check out public config in `chart/env/prod.yaml` for more details
|
| 141 |
+
TOOLS=`[
|
| 142 |
+
{
|
| 143 |
+
"_id": "000000000000000000000001",
|
| 144 |
+
"displayName": "Image Generation",
|
| 145 |
+
"description": "Use this tool to generate images based on a prompt.",
|
| 146 |
+
"color": "yellow",
|
| 147 |
+
"icon": "camera",
|
| 148 |
+
"baseUrl": "black-forest-labs/FLUX.1-schnell",
|
| 149 |
+
"name": "image_generation",
|
| 150 |
+
"endpoint": "/infer",
|
| 151 |
+
"inputs": [
|
| 152 |
+
{
|
| 153 |
+
"name": "prompt",
|
| 154 |
+
"description": "A prompt to generate an image from",
|
| 155 |
+
"paramType": "required",
|
| 156 |
+
"type": "str"
|
| 157 |
+
},
|
| 158 |
+
{ "name": "seed", "paramType": "fixed", "value": "0", "type": "float" },
|
| 159 |
+
{
|
| 160 |
+
"name": "randomize_seed",
|
| 161 |
+
"paramType": "fixed",
|
| 162 |
+
"value": "true",
|
| 163 |
+
"type": "bool"
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"name": "width",
|
| 167 |
+
"description": "numeric value between 256 and 2048",
|
| 168 |
+
"paramType": "optional",
|
| 169 |
+
"default": 1024,
|
| 170 |
+
"type": "float"
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"name": "height",
|
| 174 |
+
"description": "numeric value between 256 and 2048",
|
| 175 |
+
"paramType": "optional",
|
| 176 |
+
"default": 1024,
|
| 177 |
+
"type": "float"
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"name": "num_inference_steps",
|
| 181 |
+
"paramType": "fixed",
|
| 182 |
+
"value": "4",
|
| 183 |
+
"type": "float"
|
| 184 |
+
}
|
| 185 |
+
],
|
| 186 |
+
"outputComponent": "image",
|
| 187 |
+
"outputComponentIdx": 0,
|
| 188 |
+
"showOutput": true
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"_id": "000000000000000000000002",
|
| 192 |
+
"displayName": "Document Parser",
|
| 193 |
+
"description": "Use this tool to parse any document and get its content in markdown format.",
|
| 194 |
+
"color": "yellow",
|
| 195 |
+
"icon": "cloud",
|
| 196 |
+
"baseUrl": "huggingchat/document-parser",
|
| 197 |
+
"name": "document_parser",
|
| 198 |
+
"endpoint": "/predict",
|
| 199 |
+
"inputs": [
|
| 200 |
+
{
|
| 201 |
+
"name": "document",
|
| 202 |
+
"description": "Filename of the document to parse",
|
| 203 |
+
"paramType": "required",
|
| 204 |
+
"type": "file",
|
| 205 |
+
"mimeTypes": 'application/*'
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"name": "filename",
|
| 209 |
+
"paramType": "fixed",
|
| 210 |
+
"value": "document.pdf",
|
| 211 |
+
"type": "str"
|
| 212 |
+
}
|
| 213 |
+
],
|
| 214 |
+
"outputComponent": "textbox",
|
| 215 |
+
"outputComponentIdx": 0,
|
| 216 |
+
"showOutput": false,
|
| 217 |
+
"isHidden": true
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"_id": "000000000000000000000003",
|
| 221 |
+
"name": "edit_image",
|
| 222 |
+
"baseUrl": "multimodalart/cosxl",
|
| 223 |
+
"endpoint": "/run_edit",
|
| 224 |
+
"inputs": [
|
| 225 |
+
{
|
| 226 |
+
"name": "image",
|
| 227 |
+
"description": "The image path to be edited",
|
| 228 |
+
"paramType": "required",
|
| 229 |
+
"type": "file",
|
| 230 |
+
"mimeTypes": 'image/*'
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"name": "prompt",
|
| 234 |
+
"description": "The prompt with which to edit the image",
|
| 235 |
+
"paramType": "required",
|
| 236 |
+
"type": "str"
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"name": "negative_prompt",
|
| 240 |
+
"paramType": "fixed",
|
| 241 |
+
"value": "",
|
| 242 |
+
"type": "str"
|
| 243 |
+
},
|
| 244 |
+
{
|
| 245 |
+
"name": "guidance_scale",
|
| 246 |
+
"paramType": "fixed",
|
| 247 |
+
"value": 6.5,
|
| 248 |
+
"type": "float"
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"name": "steps",
|
| 252 |
+
"paramType": "fixed",
|
| 253 |
+
"value": 30,
|
| 254 |
+
"type": "float"
|
| 255 |
+
}
|
| 256 |
+
],
|
| 257 |
+
"outputComponent": "image",
|
| 258 |
+
"showOutput": true,
|
| 259 |
+
"displayName": "Image Editor",
|
| 260 |
+
"color": "green",
|
| 261 |
+
"icon": "camera",
|
| 262 |
+
"description": "This tool lets you edit images",
|
| 263 |
+
"outputComponentIdx": 0
|
| 264 |
+
}]`
|
| 265 |
|
| 266 |
### Rate limits ###
|
| 267 |
# See `src/lib/server/usageLimits.ts`
|
|
|
|
| 301 |
|
| 302 |
|
| 303 |
### Docker build variables ###
|
| 304 |
+
|
| 305 |
# These values cannot be updated at runtime
|
| 306 |
# They need to be passed when building the docker image
|
| 307 |
# See https://github.com/huggingface/chat-ui/main/.github/workflows/deploy-prod.yml#L44-L47
|
Dockerfile.dev
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
FROM node:20-slim
|
| 2 |
|
|
|
|
|
|
|
| 3 |
USER root
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
python3 make g++ curl gnupg && apt-get clean
|
|
|
|
| 1 |
FROM node:20-slim
|
| 2 |
|
| 3 |
+
ARG INCLUDE_DB=true
|
| 4 |
+
|
| 5 |
USER root
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
python3 make g++ curl gnupg && apt-get clean
|
compose.dev.yml
CHANGED
|
@@ -9,7 +9,6 @@ services:
|
|
| 9 |
- .:/app
|
| 10 |
- /app/node_modules # pour éviter les conflits entre host et conteneur
|
| 11 |
working_dir: /app
|
| 12 |
-
user: "1000:1000"
|
| 13 |
tty: true
|
| 14 |
mongo:
|
| 15 |
image: mongo:7
|
|
|
|
| 9 |
- .:/app
|
| 10 |
- /app/node_modules # pour éviter les conflits entre host et conteneur
|
| 11 |
working_dir: /app
|
|
|
|
| 12 |
tty: true
|
| 13 |
mongo:
|
| 14 |
image: mongo:7
|