Spaces:
Paused
Paused
Commit
·
5741be4
1
Parent(s):
a3810f8
📝 Document duplicating the space
Browse files
README.md
CHANGED
|
@@ -27,10 +27,33 @@ Default configuration is in `.env`. Put custom config and secrets in `.env.local
|
|
| 27 |
|
| 28 |
Check out [.env](./.env) to see what needs to be set.
|
| 29 |
|
| 30 |
-
Basically you need to:
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## Building
|
| 36 |
|
|
|
|
| 27 |
|
| 28 |
Check out [.env](./.env) to see what needs to be set.
|
| 29 |
|
| 30 |
+
Basically you need to create a `.env.local` with the following contents:
|
| 31 |
|
| 32 |
+
```
|
| 33 |
+
MONGODB_URL=<url to mongo, for example a free MongoDB Atlas sandbox instance>
|
| 34 |
+
MODEL_ENDPOINTS=`[{
|
| 35 |
+
"endpoint": "https://api-inference.huggingface.co/models/OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
|
| 36 |
+
"authorization": "Bearer <hf_token>",
|
| 37 |
+
"weight": 1
|
| 38 |
+
}]`
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
Where the contents in `<...>` are replaced by the MongoDB URL and your [HF Access Token](https://huggingface.co/settings/tokens).
|
| 42 |
+
|
| 43 |
+
## Duplicating to a Space
|
| 44 |
+
|
| 45 |
+
Create a `DOTENV_LOCAL` secret to your space with the following contents:
|
| 46 |
+
|
| 47 |
+
```
|
| 48 |
+
MONGODB_URL=<url to mongo, for example a free MongoDB Atlas sandbox instance>
|
| 49 |
+
MODEL_ENDPOINTS=`[{
|
| 50 |
+
"endpoint": "https://api-inference.huggingface.co/models/OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
|
| 51 |
+
"authorization": "Bearer <hf_token>",
|
| 52 |
+
"weight": 1
|
| 53 |
+
}]`
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
Where the contents in `<...>` are replaced by the MongoDB URL and your [HF Access Token](https://huggingface.co/settings/tokens).
|
| 57 |
|
| 58 |
## Building
|
| 59 |
|