RMWeerasinghe
commited on
Commit
•
00742e9
1
Parent(s):
2d5c862
Initial Commit
Browse files
model.py
CHANGED
@@ -7,9 +7,9 @@ from logging import getLogger
|
|
7 |
import streamlit as st
|
8 |
import torch
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
hf_token = st.secrets["HF_TOKEN"]
|
13 |
login(token=hf_token)
|
14 |
logger = getLogger(__name__)
|
15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
7 |
import streamlit as st
|
8 |
import torch
|
9 |
|
10 |
+
load_dotenv()
|
11 |
+
hf_token = os.environ.get("HF_TOKEN")
|
12 |
+
# hf_token = st.secrets["HF_TOKEN"]
|
13 |
login(token=hf_token)
|
14 |
logger = getLogger(__name__)
|
15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|