mishig HF staff commited on
Commit
2fc66df
1 Parent(s): 86574c0

Fix env var usage

Browse files
Files changed (1) hide show
  1. src/routes/+page.server.ts +2 -1
src/routes/+page.server.ts CHANGED
@@ -1,11 +1,12 @@
1
  import type { ModelEntryWithTokenizer } from '$lib/types';
2
  import type { ModelEntry } from '@huggingface/hub';
3
  import type { PageServerLoad } from './$types';
 
4
 
5
  export const load: PageServerLoad = async ({ fetch }) => {
6
  const apiUrl =
7
  'https://huggingface.co/api/models?pipeline_tag=text-generation&inference=Warm&filter=conversational';
8
- const HF_TOKEN = import.meta.env.HF_TOKEN;
9
 
10
  const res = await fetch(apiUrl, {
11
  headers: {
 
1
  import type { ModelEntryWithTokenizer } from '$lib/types';
2
  import type { ModelEntry } from '@huggingface/hub';
3
  import type { PageServerLoad } from './$types';
4
+ import { env } from '$env/dynamic/private';
5
 
6
  export const load: PageServerLoad = async ({ fetch }) => {
7
  const apiUrl =
8
  'https://huggingface.co/api/models?pipeline_tag=text-generation&inference=Warm&filter=conversational';
9
+ const HF_TOKEN = env.HF_TOKEN;
10
 
11
  const res = await fetch(apiUrl, {
12
  headers: {