nimra-mughal commited on
Commit
5c6a113
·
verified ·
1 Parent(s): 044e733

Update ai_design_generator/app.py

Browse files
Files changed (1) hide show
  1. ai_design_generator/app.py +3 -1
ai_design_generator/app.py CHANGED
@@ -12,7 +12,9 @@ prompt = st.text_input("Prompt", "modern minimalist packaging with red and white
12
  if st.button("Generate Design"):
13
  with st.spinner("Generating..."):
14
  API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2"
15
- headers = {"Authorization": "Bearer YOUR_HUGGINGFACE_TOKEN"}
 
 
16
 
17
  payload = {"inputs": prompt}
18
  response = requests.post(API_URL, headers=headers, json=payload)
 
12
  if st.button("Generate Design"):
13
  with st.spinner("Generating..."):
14
  API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2"
15
+ import os
16
+ headers = {"Authorization": f"Bearer {os.environ['HF_TOKEN']}"}
17
+
18
 
19
  payload = {"inputs": prompt}
20
  response = requests.post(API_URL, headers=headers, json=payload)