brandyguillory commited on
Commit
a187c2a
1 Parent(s): 06aa116

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
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