deepsync commited on
Commit
fc15049
·
verified ·
1 Parent(s): 534de65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,8 +4,7 @@ import requests
4
 
5
  headers = {
6
  'accept': 'application/json',
7
- 'Content-Type': 'application/json',
8
- 'Authorization': f'Bearer {os.environ.get("USERNAME")}:{os.environ.get("PASSWORD")}'
9
  }
10
 
11
  def trigger(id):
@@ -14,7 +13,7 @@ def trigger(id):
14
  'id': id.strip(),
15
  },
16
  }
17
- response = requests.post(f'http://{os.environ.get("IP_ADDRESS")}:8080/api/v1/dags/{os.environ.get("DAG_ID")}/dagRuns', headers=headers, json=json_data)
18
  return response.status_code
19
 
20
  id_name = gradio.Textbox(label="ID")
 
4
 
5
  headers = {
6
  'accept': 'application/json',
7
+ 'Content-Type': 'application/json'
 
8
  }
9
 
10
  def trigger(id):
 
13
  'id': id.strip(),
14
  },
15
  }
16
+ response = requests.post(f'http://{os.environ.get("IP_ADDRESS")}:8080/api/v1/dags/{os.environ.get("DAG_ID")}/dagRuns', headers=headers, json=json_data, auth=(os.environ.get("USERNAME"),os.environ.get("PASSWORD")))
17
  return response.status_code
18
 
19
  id_name = gradio.Textbox(label="ID")