Diptaraj Sen commited on
Commit
a14c96e
·
1 Parent(s): 9424a5e

added HF token to the streamlit secrets

Browse files
Files changed (1) hide show
  1. streamlit_app.py +9 -0
streamlit_app.py CHANGED
@@ -5,6 +5,15 @@ from app.tts import speak_story
5
  import tempfile
6
  from PIL import Image
7
 
 
 
 
 
 
 
 
 
 
8
  st.set_page_config(page_title="GenAI Storyteller", layout="centered")
9
 
10
  st.title("📸🧠 GenAI Storyteller")
 
5
  import tempfile
6
  from PIL import Image
7
 
8
+ from huggingface_hub import login
9
+ import os
10
+
11
+ # Get token from Streamlit secrets
12
+ hf_token = st.secrets["HF_TOKEN"]
13
+
14
+ # Login to Hugging Face Hub
15
+ login(token=hf_token)
16
+
17
  st.set_page_config(page_title="GenAI Storyteller", layout="centered")
18
 
19
  st.title("📸🧠 GenAI Storyteller")