Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,11 +3,7 @@ import streamlit as st
|
|
| 3 |
from transformers import pipeline
|
| 4 |
import warnings
|
| 5 |
from huggingface_hub import login
|
| 6 |
-
|
| 7 |
-
login(token =
|
| 8 |
-
<huggingfaec-token>)
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
# Title for the web app
|
| 13 |
st.title("Test Large Language Models from Hugging Face")
|
|
@@ -20,6 +16,13 @@ models = [
|
|
| 20 |
"bartowski/Meta-Llama-3.1-8B-Claude-GGUF"
|
| 21 |
]
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
selected_model = st.selectbox("Select a model to test:", models)
|
| 25 |
|
|
|
|
| 3 |
from transformers import pipeline
|
| 4 |
import warnings
|
| 5 |
from huggingface_hub import login
|
| 6 |
+
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Title for the web app
|
| 9 |
st.title("Test Large Language Models from Hugging Face")
|
|
|
|
| 16 |
"bartowski/Meta-Llama-3.1-8B-Claude-GGUF"
|
| 17 |
]
|
| 18 |
|
| 19 |
+
st.write(
|
| 20 |
+
#"Has environment variables been set:",
|
| 21 |
+
os.environ["HF_ACCESS_TOKEN"] == st.secrets["HF_ACCESS_TOKEN"])
|
| 22 |
+
|
| 23 |
+
hf_api_token = st.secrets["HF_ACCESS_TOKEN"]
|
| 24 |
+
|
| 25 |
+
login(token=hf_api_token)
|
| 26 |
|
| 27 |
selected_model = st.selectbox("Select a model to test:", models)
|
| 28 |
|