jbilcke-hf HF staff commited on
Commit
9074714
β€’
1 Parent(s): 1d8d40b

fix this error: https://nextjs.org/docs/messages/no-assign-module-variable

Browse files
Files changed (1) hide show
  1. src/app/queries/predict.ts +2 -4
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
- const module = await import("./predictWithOpenAI")
10
- return module.predictWithOpenAI
11
  } else {
12
- const module = await import("./predictWithHuggingFace")
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
  }