Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Ankush Rana
commited on
Commit
·
601083c
1
Parent(s):
e00f2dd
make title generate from same model
Browse files- .env.local.template +6 -17
- Dockerfile +1 -3
- entrypoint.sh.template +2 -2
.env.local.template
CHANGED
|
@@ -110,7 +110,7 @@ MODELS=`[
|
|
| 110 |
#Repetition penality = presence_penalty + 2 # FOR TGI
|
| 111 |
|
| 112 |
TASK_MODEL=`{
|
| 113 |
-
"name": "
|
| 114 |
"preprompt": "",
|
| 115 |
"chatPromptTemplate": "{{#if @root.preprompt}}system\n{{@root.preprompt}}\n{{/if}}{{#each messages}}{{#ifUser}}{{content}}\n\n{{/ifUser}}{{#ifAssistant}}{{content}}\n{{/ifAssistant}}{{/each}}",
|
| 116 |
"promptExamples": [
|
|
@@ -129,8 +129,9 @@ TASK_MODEL=`{
|
|
| 129 |
],
|
| 130 |
"endpoints": [
|
| 131 |
{
|
| 132 |
-
"type": "
|
| 133 |
-
"
|
|
|
|
| 134 |
}
|
| 135 |
],
|
| 136 |
"parameters": {
|
|
@@ -139,25 +140,13 @@ TASK_MODEL=`{
|
|
| 139 |
"max_new_tokens": 200,
|
| 140 |
}
|
| 141 |
}`
|
| 142 |
-
OLD_MODELS=`[]`# any removed models, `{ name: string, displayName?: string, id?: string }`
|
| 143 |
-
|
| 144 |
-
PUBLIC_ORIGIN=https://bsc-lt-chatui.hf.space #${SPACE_HOST}
|
| 145 |
-
PUBLIC_SHARE_PREFIX=https://bsc-lt-chatui.hf.space #${SPACE_HOST}/r
|
| 146 |
-
PUBLIC_GOOGLE_ANALYTICS_ID=#G-XXXXXXXX / Leave empty to disable
|
| 147 |
-
PUBLIC_DEPRECATED_GOOGLE_ANALYTICS_ID=#UA-XXXXXXXX-X / Leave empty to disable
|
| 148 |
-
PUBLIC_ANNOUNCEMENT_BANNERS=`[
|
| 149 |
-
{
|
| 150 |
-
"title": "Soon function calling (tools) will be integrated",
|
| 151 |
-
"linkTitle": "Function calling",
|
| 152 |
-
}
|
| 153 |
-
]`
|
| 154 |
|
| 155 |
PARQUET_EXPORT_DATASET=
|
| 156 |
PARQUET_EXPORT_HF_TOKEN=
|
| 157 |
PARQUET_EXPORT_SECRET=
|
| 158 |
|
| 159 |
-
PUBLIC_APP_NAME
|
| 160 |
PUBLIC_APP_ASSETS=chatui # used to find logos & favicons in static/$PUBLIC_APP_ASSETS
|
| 161 |
-
PUBLIC_APP_COLOR
|
| 162 |
PUBLIC_APP_DATA_SHARING=#set to 1 to enable disclaimers & options about data sharing
|
| 163 |
PUBLIC_APP_DATA_DISCLAIMER=#set to 1 to enable disclaimers about model outputs
|
|
|
|
| 110 |
#Repetition penality = presence_penalty + 2 # FOR TGI
|
| 111 |
|
| 112 |
TASK_MODEL=`{
|
| 113 |
+
"name": "vllm",
|
| 114 |
"preprompt": "",
|
| 115 |
"chatPromptTemplate": "{{#if @root.preprompt}}system\n{{@root.preprompt}}\n{{/if}}{{#each messages}}{{#ifUser}}{{content}}\n\n{{/ifUser}}{{#ifAssistant}}{{content}}\n{{/ifAssistant}}{{/each}}",
|
| 116 |
"promptExamples": [
|
|
|
|
| 129 |
],
|
| 130 |
"endpoints": [
|
| 131 |
{
|
| 132 |
+
"type": "openai",
|
| 133 |
+
"baseURL": "${BASEURL_SALAMANDRA_TOOLS}/v1",
|
| 134 |
+
"apiKey": "${HF_TOKEN}"
|
| 135 |
}
|
| 136 |
],
|
| 137 |
"parameters": {
|
|
|
|
| 140 |
"max_new_tokens": 200,
|
| 141 |
}
|
| 142 |
}`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
PARQUET_EXPORT_DATASET=
|
| 145 |
PARQUET_EXPORT_HF_TOKEN=
|
| 146 |
PARQUET_EXPORT_SECRET=
|
| 147 |
|
| 148 |
+
PUBLIC_APP_NAME=chatui # name used as title throughout the app
|
| 149 |
PUBLIC_APP_ASSETS=chatui # used to find logos & favicons in static/$PUBLIC_APP_ASSETS
|
| 150 |
+
PUBLIC_APP_COLOR=blue # can be any of tailwind colors: https://tailwindcss.com/docs/customizing-colors#default-color-palette
|
| 151 |
PUBLIC_APP_DATA_SHARING=#set to 1 to enable disclaimers & options about data sharing
|
| 152 |
PUBLIC_APP_DATA_DISCLAIMER=#set to 1 to enable disclaimers about model outputs
|
Dockerfile
CHANGED
|
@@ -50,7 +50,7 @@ RUN --mount=type=cache,target=/app/.npm \
|
|
| 50 |
|
| 51 |
RUN npm run build
|
| 52 |
|
| 53 |
-
FROM
|
| 54 |
|
| 55 |
ARG MODEL_NAME
|
| 56 |
ARG MODEL_PROMPT_TEMPLATE
|
|
@@ -60,8 +60,6 @@ ARG APP_NAME
|
|
| 60 |
ENV TZ=Europe/Paris \
|
| 61 |
PORT=3000
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
| 66 |
gnupg \
|
| 67 |
curl \
|
|
|
|
| 50 |
|
| 51 |
RUN npm run build
|
| 52 |
|
| 53 |
+
FROM python:3.10-slim
|
| 54 |
|
| 55 |
ARG MODEL_NAME
|
| 56 |
ARG MODEL_PROMPT_TEMPLATE
|
|
|
|
| 60 |
ENV TZ=Europe/Paris \
|
| 61 |
PORT=3000
|
| 62 |
|
|
|
|
|
|
|
| 63 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
| 64 |
gnupg \
|
| 65 |
curl \
|
entrypoint.sh.template
CHANGED
|
@@ -7,10 +7,10 @@
|
|
| 7 |
# mongod &
|
| 8 |
|
| 9 |
# # Start the text-generation-inference process
|
| 10 |
-
text-generation-launcher --model-id czearing/article-title-generator --num-shard 1 --port 8090 --trust-remote-code &
|
| 11 |
|
| 12 |
# # Wait for text-generation-inference to start
|
| 13 |
-
curl --retry 60 --retry-delay 10 --retry-connrefused http://127.0.0.1:8090/health
|
| 14 |
|
| 15 |
# Start the chat-ui process
|
| 16 |
export PUBLIC_VERSION="2.0"
|
|
|
|
| 7 |
# mongod &
|
| 8 |
|
| 9 |
# # Start the text-generation-inference process
|
| 10 |
+
# text-generation-launcher --model-id czearing/article-title-generator --num-shard 1 --port 8090 --trust-remote-code &
|
| 11 |
|
| 12 |
# # Wait for text-generation-inference to start
|
| 13 |
+
# curl --retry 60 --retry-delay 10 --retry-connrefused http://127.0.0.1:8090/health
|
| 14 |
|
| 15 |
# Start the chat-ui process
|
| 16 |
export PUBLIC_VERSION="2.0"
|