SumayyaAli commited on
Commit
078b2c2
·
verified ·
1 Parent(s): 5a80229

update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -5,6 +5,14 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
5
  from transformers import pipeline
6
  import torch
7
  import base64
 
 
 
 
 
 
 
 
8
 
9
 
10
  checkpoint = "D:/project/LaMini-Flan-T5-248M"
 
5
  from transformers import pipeline
6
  import torch
7
  import base64
8
+ import os
9
+ from dotenv import load_dotenv
10
+ load_dotenv()
11
+ token = os.environ.get("HF_TOKEN")
12
+
13
+ # Use the token for model loading or other tasks
14
+ tokenizer = T5Tokenizer.from_pretrained("LaMini-Flan-T5-248M", token=token)
15
+
16
 
17
 
18
  checkpoint = "D:/project/LaMini-Flan-T5-248M"