Spaces:
Runtime error
Runtime error
SumayyaAli
commited on
update app.py
Browse files
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"
|