Spaces:
Sleeping
Sleeping
dinhquangson
commited on
Commit
•
16a13e4
1
Parent(s):
035a5a1
Update app.py
Browse files
app.py
CHANGED
@@ -154,7 +154,8 @@ def main():
|
|
154 |
# then hide the input
|
155 |
huggingface_token = st.text_input("Enter your HuggingFace Hub token", type="password", value="DNTClESFouRJbgsoxTzdLFzYfIlGSVsWvM")
|
156 |
#openai_api_key = st.text_input("Enter your OpenAI API key", type="password")
|
157 |
-
|
|
|
158 |
# set this key as an environment variable
|
159 |
os.environ["HUGGINGFACEHUB_API_TOKEN"] = huggingface_token
|
160 |
#os.environ["OPENAI_API_KEY"] = openai_api_key
|
|
|
154 |
# then hide the input
|
155 |
huggingface_token = st.text_input("Enter your HuggingFace Hub token", type="password", value="DNTClESFouRJbgsoxTzdLFzYfIlGSVsWvM")
|
156 |
#openai_api_key = st.text_input("Enter your OpenAI API key", type="password")
|
157 |
+
if not huggingface_token.startswith("hf_"):
|
158 |
+
huggingface_token = "hf_" + huggingface_token
|
159 |
# set this key as an environment variable
|
160 |
os.environ["HUGGINGFACEHUB_API_TOKEN"] = huggingface_token
|
161 |
#os.environ["OPENAI_API_KEY"] = openai_api_key
|