Spaces:
Running
Running
use provider to generate
Browse files- app/_actions/generate.ts +1 -3
app/_actions/generate.ts
CHANGED
@@ -10,9 +10,7 @@ export async function generate({ brand_name, industry, description }: Form) {
|
|
10 |
if (!process.env.PUBLIC_FILE_UPLOAD_DIR) {
|
11 |
throw new Error("PUBLIC_FILE_UPLOAD_DIR is not set");
|
12 |
}
|
13 |
-
const inference = new HfInference(process.env.HF_ACCESS_TOKEN
|
14 |
-
use_cache: false,
|
15 |
-
});
|
16 |
|
17 |
const prompt: any = await inference
|
18 |
.chatCompletion({
|
|
|
10 |
if (!process.env.PUBLIC_FILE_UPLOAD_DIR) {
|
11 |
throw new Error("PUBLIC_FILE_UPLOAD_DIR is not set");
|
12 |
}
|
13 |
+
const inference = new HfInference(process.env.HF_ACCESS_TOKEN);
|
|
|
|
|
14 |
|
15 |
const prompt: any = await inference
|
16 |
.chatCompletion({
|