oberbics commited on
Commit
4f7c964
·
verified ·
1 Parent(s): 093239e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,7 +26,7 @@ MAP_TILES = {
26
  }
27
 
28
  # NuExtract API configuration
29
- model_name = "numind/NuExtract-v1.5"
30
  headers = {"Authorization": f"Bearer {os.environ.get('HF_TOKEN', '')}"}
31
 
32
  class SafeGeocoder:
@@ -89,7 +89,7 @@ def load_model():
89
  }
90
  }
91
 
92
- response = requests.post(model_name, headers=headers, json=payload)
93
 
94
  if response.status_code == 503:
95
  response_json = response.json()
@@ -124,7 +124,7 @@ def extract_info(template, text):
124
  }
125
  }
126
 
127
- response = requests.post(model_nameL, headers=headers, json=payload)
128
 
129
  if response.status_code == 503:
130
  response_json = response.json()
 
26
  }
27
 
28
  # NuExtract API configuration
29
+ API_URL = "https://api-inference.huggingface.co/models/numind/NuExtract-1.5"
30
  headers = {"Authorization": f"Bearer {os.environ.get('HF_TOKEN', '')}"}
31
 
32
  class SafeGeocoder:
 
89
  }
90
  }
91
 
92
+ response = requests.post(API_URL, headers=headers, json=payload)
93
 
94
  if response.status_code == 503:
95
  response_json = response.json()
 
124
  }
125
  }
126
 
127
+ response = requests.post(API_URL, headers=headers, json=payload)
128
 
129
  if response.status_code == 503:
130
  response_json = response.json()