Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
β’
9074714
1
Parent(s):
1d8d40b
fix this error: https://nextjs.org/docs/messages/no-assign-module-variable
Browse files
src/app/queries/predict.ts
CHANGED
@@ -6,10 +6,8 @@ const llmEngine = `${process.env.LLM_ENGINE || ""}` as LLMEngine
|
|
6 |
|
7 |
export const predict = async () => {
|
8 |
if (llmEngine === "OPENAI") {
|
9 |
-
|
10 |
-
return module.predictWithOpenAI
|
11 |
} else {
|
12 |
-
|
13 |
-
return module.predictWithHuggingFace
|
14 |
}
|
15 |
}
|
|
|
6 |
|
7 |
export const predict = async () => {
|
8 |
if (llmEngine === "OPENAI") {
|
9 |
+
return (await import("./predictWithOpenAI")).predictWithOpenAI
|
|
|
10 |
} else {
|
11 |
+
return (await import("./predictWithHuggingFace")).predictWithHuggingFace
|
|
|
12 |
}
|
13 |
}
|