gstaff commited on
Commit
91fe111
·
1 Parent(s): 35141b5

Allow redirects when configuring LCM client.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,9 +26,9 @@ headers = {"Authorization": f"Bearer {HF_TOKEN}"}
26
 
27
 
28
  def configure_image_client():
29
- url = "https://latent-consistency-super-fast-lcm-lora-sd1-5.hf.space/?view=api"
30
  try:
31
- response = requests.get(url)
32
  response.raise_for_status()
33
  content_text = response.text
34
  pattern = r'"root":"(https://latent-consistency-super-fast-lcm-lora-sd1-5.hf.space/.*?)"'
 
26
 
27
 
28
  def configure_image_client():
29
+ url = r"https://latent-consistency-super-fast-lcm-lora-sd1-5.hf.space/"
30
  try:
31
+ response = requests.get(url, params={"view": "api"}, allow_redirects=True)
32
  response.raise_for_status()
33
  content_text = response.text
34
  pattern = r'"root":"(https://latent-consistency-super-fast-lcm-lora-sd1-5.hf.space/.*?)"'