Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
import streamlit as st
|
| 3 |
-
|
| 4 |
-
# Access Hugging Face API key from secrets
|
| 5 |
-
hf_token = st.secrets["huggingface"]["hf_token"]
|
| 6 |
-
if not hf_token:
|
| 7 |
-
st.error("Hugging Face API key not found. Please make sure it is set in the secrets.")
|
| 8 |
-
Example Code Using Secrets
|
| 9 |
-
Here is the updated code snippet using the secrets from secrets.toml:
|
| 10 |
-
|
| 11 |
-
PYTHON
|
| 12 |
import streamlit as st
|
| 13 |
import os
|
| 14 |
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import os
|
| 3 |
import subprocess
|