use streamlit secrets for hf key
Browse files
models.py
CHANGED
@@ -2,12 +2,14 @@ import json
|
|
2 |
from PIL import Image
|
3 |
|
4 |
import requests
|
|
|
5 |
from transformers import CLIPProcessor, CLIPModel
|
6 |
|
7 |
from embeddings import logger
|
8 |
|
9 |
-
|
10 |
-
|
|
|
11 |
|
12 |
|
13 |
class HuggingFaceHosted:
|
|
|
2 |
from PIL import Image
|
3 |
|
4 |
import requests
|
5 |
+
import streamlit as st
|
6 |
from transformers import CLIPProcessor, CLIPModel
|
7 |
|
8 |
from embeddings import logger
|
9 |
|
10 |
+
HF_TOKEN = st.secrets["hf_api.key"]
|
11 |
+
#with open("hf_api.key") as f:
|
12 |
+
# HF_TOKEN = f.read().strip()
|
13 |
|
14 |
|
15 |
class HuggingFaceHosted:
|