Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -0
src/streamlit_app.py
CHANGED
|
@@ -5,6 +5,13 @@ from sentence_transformers import SentenceTransformer, util
|
|
| 5 |
from huggingface_hub import hf_hub_download
|
| 6 |
import os
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
st.set_page_config(page_title="ArXiv Expert Finder", page_icon="🔬", layout="wide")
|
| 9 |
st.title("ArXiv Expert Finder")
|
| 10 |
|
|
|
|
| 5 |
from huggingface_hub import hf_hub_download
|
| 6 |
import os
|
| 7 |
|
| 8 |
+
token = os.getenv("HF_TOKEN") # kommt aus Spaces Secrets
|
| 9 |
+
if not token:
|
| 10 |
+
st.error("HF_TOKEN Secret fehlt. In Spaces: Settings → Secrets setzen.")
|
| 11 |
+
st.stop()
|
| 12 |
+
|
| 13 |
+
os.environ["HUGGINGFACE_HUB_TOKEN"] = token
|
| 14 |
+
|
| 15 |
st.set_page_config(page_title="ArXiv Expert Finder", page_icon="🔬", layout="wide")
|
| 16 |
st.title("ArXiv Expert Finder")
|
| 17 |
|