LivanArzuaga commited on
Commit
eec880a
路
verified 路
1 Parent(s): 9eb65b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -16,11 +16,11 @@ load_dotenv()
16
  # Configuraci贸n de la API de Flowise
17
  #API_URL = os.getenv("API_URL", "https://livanarzuaga-test.hf.space/api/v1/prediction/2dba91d7-15b7-4475-b0ec-34a11ffbeab5")
18
 
19
- API_URL = os.getenv("API_URL", "https://wilkie-hf-space-tuto.hf.space/api/v1/prediction/037dd3d4-8492-45c4-9c5f-6ff84b8e95ee")
20
 
21
 
22
- #API_URL = os.getenv("API_URL","https://marie0501-boulder-weather-flowise.hf.space/api/v1/prediction/dd2d1375-8019-4f52-bc23-1d0845b4a0c1")
23
- #head = {"Authorization": "Bearer o6Xy3bIuPhDJV_z0PefeuvbHO2X3yo3Rt7NSiW-bY4o"}
24
 
25
  session = requests.Session()
26
 
@@ -30,7 +30,7 @@ session.mount('https://', HTTPAdapter(max_retries=retries))
30
 
31
  def query(payload, api_url=API_URL):
32
  try:
33
- response = session.post(api_url, json=payload)
34
  response.raise_for_status()
35
  return response.json()
36
  except requests.exceptions.HTTPError as http_err:
 
16
  # Configuraci贸n de la API de Flowise
17
  #API_URL = os.getenv("API_URL", "https://livanarzuaga-test.hf.space/api/v1/prediction/2dba91d7-15b7-4475-b0ec-34a11ffbeab5")
18
 
19
+ #API_URL = os.getenv("API_URL", "https://wilkie-hf-space-tuto.hf.space/api/v1/prediction/037dd3d4-8492-45c4-9c5f-6ff84b8e95ee")
20
 
21
 
22
+ API_URL = os.getenv("API_URL","https://marie0501-boulder-weather-flowise.hf.space/api/v1/prediction/dd2d1375-8019-4f52-bc23-1d0845b4a0c1")
23
+ head = {"Authorization": "Bearer o6Xy3bIuPhDJV_z0PefeuvbHO2X3yo3Rt7NSiW-bY4o"}
24
 
25
  session = requests.Session()
26
 
 
30
 
31
  def query(payload, api_url=API_URL):
32
  try:
33
+ response = session.post(api_url, json=payload, headers=head)
34
  response.raise_for_status()
35
  return response.json()
36
  except requests.exceptions.HTTPError as http_err: