Canstralian commited on
Commit
24ba913
·
verified ·
1 Parent(s): 7ca0d3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import yaml
2
- import streamlit as st
3
  import requests
4
  from bs4 import BeautifulSoup
5
  import pandas as pd
@@ -10,6 +10,16 @@ from components.chat_box import chat_box
10
  from components.chat_loop import chat_loop
11
  from components.init_state import init_state
12
  from components.prompt_engineering_dashboard import prompt_engineering_dashboard
 
 
 
 
 
 
 
 
 
 
13
 
14
  # Load config.yaml
15
  with open("config.yaml", "r") as file:
 
1
  import yaml
2
+ import huggingface_hub
3
  import requests
4
  from bs4 import BeautifulSoup
5
  import pandas as pd
 
10
  from components.chat_loop import chat_loop
11
  from components.init_state import init_state
12
  from components.prompt_engineering_dashboard import prompt_engineering_dashboard
13
+ import streamlit as st
14
+
15
+ # Access the Hugging Face token
16
+ hf_token = st.secrets["HF_TOKEN"]
17
+
18
+ # Example usage: if you're using the Hugging Face API
19
+ from huggingface_hub import login
20
+
21
+ login(token=hf_token)
22
+
23
 
24
  # Load config.yaml
25
  with open("config.yaml", "r") as file: