Lhumpal commited on
Commit
0526456
·
verified ·
1 Parent(s): 9c86737

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import os
5
  from google import genai
6
  from google.genai.types import GenerateContentConfig
7
  from datasets import load_dataset
8
-
9
 
10
  app = FastAPI()
11
 
@@ -13,6 +13,8 @@ app = FastAPI()
13
  hf_token = os.environ.get("HF_TOKEN")
14
  google_api_key = os.environ.get("GOOGLE_API_KEY")
15
 
 
 
16
  # grab dataset
17
  dataset = load_dataset("Lhumpal/youtube-hunting-beast-transcripts", data_files={"concise": "concise/*", "raw": "raw/*"})
18
  concise_text = dataset["concise"]["text"]
 
5
  from google import genai
6
  from google.genai.types import GenerateContentConfig
7
  from datasets import load_dataset
8
+ from huggingface_hub import login
9
 
10
  app = FastAPI()
11
 
 
13
  hf_token = os.environ.get("HF_TOKEN")
14
  google_api_key = os.environ.get("GOOGLE_API_KEY")
15
 
16
+ login(token=hf_token)
17
+
18
  # grab dataset
19
  dataset = load_dataset("Lhumpal/youtube-hunting-beast-transcripts", data_files={"concise": "concise/*", "raw": "raw/*"})
20
  concise_text = dataset["concise"]["text"]