Spaces:
Sleeping
Sleeping
Commit
•
4043a8e
1
Parent(s):
24b3b53
community feature
Browse files- .env +1 -0
- README.md +3 -2
- src/app/engine/community.ts +4 -3
.env
CHANGED
@@ -30,6 +30,7 @@ HF_INFERENCE_API_MODEL="codellama/CodeLlama-7b-hf"
|
|
30 |
OPENAI_TOKEN=
|
31 |
|
32 |
# ----------- COMMUNITY SHARING (OPTIONAL) -----------
|
|
|
33 |
# You don't need those community sharing options to run the AI Comic Factory
|
34 |
# locally or on your own server (they are meant to be used by the Hugging Face team)
|
35 |
COMMUNITY_API_URL=
|
|
|
30 |
OPENAI_TOKEN=
|
31 |
|
32 |
# ----------- COMMUNITY SHARING (OPTIONAL) -----------
|
33 |
+
NEXT_PUBLIC_ENABLE_COMMUNITY_SHARING="false"
|
34 |
# You don't need those community sharing options to run the AI Comic Factory
|
35 |
# locally or on your own server (they are meant to be used by the Hugging Face team)
|
36 |
COMMUNITY_API_URL=
|
README.md
CHANGED
@@ -31,9 +31,10 @@ In addition, there are some community sharing variables that you can just ignore
|
|
31 |
Those variables are not required to run the AI Comic Factory on your own website or computer
|
32 |
(they are meant to create a connection with the Hugging Face community,
|
33 |
and thus only make sense for official Hugging Face apps):
|
34 |
-
- `
|
|
|
35 |
- `COMMUNITY_API_TOKEN`: you don't need this
|
36 |
-
- `COMMUNITY_API_ID`:
|
37 |
|
38 |
Please read the `.env` default config file for more informations.
|
39 |
To customise a variable locally, you should create a `.env.local`
|
|
|
31 |
Those variables are not required to run the AI Comic Factory on your own website or computer
|
32 |
(they are meant to create a connection with the Hugging Face community,
|
33 |
and thus only make sense for official Hugging Face apps):
|
34 |
+
- `NEXT_PUBLIC_ENABLE_COMMUNITY_SHARING`: you don't need this
|
35 |
+
- `COMMUNITY_API_URL`: you don't need this
|
36 |
- `COMMUNITY_API_TOKEN`: you don't need this
|
37 |
+
- `COMMUNITY_API_ID`: you don't need this
|
38 |
|
39 |
Please read the `.env` default config file for more informations.
|
40 |
To customise a variable locally, you should create a `.env.local`
|
src/app/engine/community.ts
CHANGED
@@ -120,8 +120,9 @@ export async function getLatestPosts(): Promise<Post[]> {
|
|
120 |
// console.log("response:", response)
|
121 |
return Array.isArray(response?.posts) ? response?.posts : []
|
122 |
} catch (err) {
|
123 |
-
const error = `failed to get posts: ${err}`
|
124 |
-
console.error(error)
|
125 |
-
throw new Error(error)
|
|
|
126 |
}
|
127 |
}
|
|
|
120 |
// console.log("response:", response)
|
121 |
return Array.isArray(response?.posts) ? response?.posts : []
|
122 |
} catch (err) {
|
123 |
+
// const error = `failed to get posts: ${err}`
|
124 |
+
// console.error(error)
|
125 |
+
// throw new Error(error)
|
126 |
+
return []
|
127 |
}
|
128 |
}
|