Jangai commited on
Commit
7326a19
·
verified ·
1 Parent(s): 553dd80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,7 +14,8 @@ if not ZEPHYR_API_TOKEN or not SD_API_TOKEN:
14
  ZEPHYR_API_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
15
  SD_API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
16
 
17
- def query_zephyr(prompt):
 
18
  headers = {"Authorization": f"Bearer {ZEPHYR_API_TOKEN}"}
19
  response = requests.post(ZEPHYR_API_URL, headers=headers, json={"inputs": prompt})
20
  return response.json()
 
14
  ZEPHYR_API_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
15
  SD_API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
16
 
17
+ def query_zephyr(linkedin_text):
18
+ prompt = f"prepare a prompt for Stable Diffusion for the following Linkedin post: {linkedin_text}"
19
  headers = {"Authorization": f"Bearer {ZEPHYR_API_TOKEN}"}
20
  response = requests.post(ZEPHYR_API_URL, headers=headers, json={"inputs": prompt})
21
  return response.json()