DevNumb commited on
Commit
f34da27
·
verified ·
1 Parent(s): 5e630af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ def extract_text(file):
28
  # ---- API embedding helper ----
29
  def get_embedding(text):
30
  payload = {"inputs": text}
31
- resp = requests.post(HF_API_URL, headers=HEADERS, json=payload, timeout=60)
32
  data = resp.json()
33
  if isinstance(data, list) and "embedding" in data[0]:
34
  return np.array(data[0]["embedding"])
 
28
  # ---- API embedding helper ----
29
  def get_embedding(text):
30
  payload = {"inputs": text}
31
+ resp = requests.post(API_URL, headers=HEADERS, json=payload, timeout=60)
32
  data = resp.json()
33
  if isinstance(data, list) and "embedding" in data[0]:
34
  return np.array(data[0]["embedding"])