Spaces:
Runtime error
Runtime error
add private model hosting with secret
Browse files
app.py
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
2 |
import streamlit as st
|
3 |
from PIL import Image
|
|
|
4 |
|
5 |
-
|
6 |
-
|
|
|
|
|
7 |
|
8 |
img_full = Image.open("images/vl-logo-nlp-blue.png")
|
9 |
img_short = Image.open("images/sVL-NLP-short.png")
|
|
|
1 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
2 |
import streamlit as st
|
3 |
from PIL import Image
|
4 |
+
import os
|
5 |
|
6 |
+
auth_token = os.environ.get("TOKEN_FROM_SECRET") or True
|
7 |
+
|
8 |
+
tokenizer= T5Tokenizer.from_pretrained("Voicelab/vlt5-base-keywords-v4_3-en", use_auth_token=auth_token)
|
9 |
+
model = T5ForConditionalGeneration.from_pretrained("Voicelab/vlt5-base-keywords-v4_3-en", use_auth_token=auth_token)
|
10 |
|
11 |
img_full = Image.open("images/vl-logo-nlp-blue.png")
|
12 |
img_short = Image.open("images/sVL-NLP-short.png")
|