masadonline commited on
Commit
5a79e69
·
verified ·
1 Parent(s): 9850d63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -4,7 +4,11 @@ import requests
4
 
5
  # --- CONFIG ---
6
  SIGN_IMAGE_FOLDER = "sign_images"
7
- HF_TOKEN = "your_huggingface_token" # Replace with your actual token
 
 
 
 
8
  HF_MODEL = "facebook/mbart-large-50-many-to-many-mmt"
9
 
10
  # --- STREAMLIT UI ---
 
4
 
5
  # --- CONFIG ---
6
  SIGN_IMAGE_FOLDER = "sign_images"
7
+ HF_TOKEN = os.getenv("HF_API_TOKEN")
8
+ if not HF_TOKEN:
9
+ st.error("Hugging Face API token not found. Please set 'HF_API_TOKEN' in your environment.")
10
+ st.stop()
11
+
12
  HF_MODEL = "facebook/mbart-large-50-many-to-many-mmt"
13
 
14
  # --- STREAMLIT UI ---