Narsil HF staff commited on
Commit
83caf37
1 Parent(s): 7875017

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -18,6 +18,7 @@ Options:
18
  """
19
 
20
  API_URL = os.getenv("API_URL")
 
21
 
22
  examples = [
23
  [
@@ -77,7 +78,7 @@ examples = [
77
 
78
  def query(payload):
79
  print(payload)
80
- response = requests.request("POST", API_URL, json=payload)
81
  print(response)
82
  return json.loads(response.content.decode("utf-8"))
83
 
 
18
  """
19
 
20
  API_URL = os.getenv("API_URL")
21
+ TOKEN = os.getenv("TOKEN")
22
 
23
  examples = [
24
  [
 
78
 
79
  def query(payload):
80
  print(payload)
81
+ response = requests.request("POST", API_URL, json=payload, headers={"Authorization": f"Bearer {TOKEN}"})
82
  print(response)
83
  return json.loads(response.content.decode("utf-8"))
84