Pepsr commited on
Commit
8a8c396
·
1 Parent(s): 86b1f05
Files changed (2) hide show
  1. app.py +1 -2
  2. getFlightData.py +4 -8
app.py CHANGED
@@ -13,8 +13,7 @@ from langchain.memory import ConversationBufferMemory
13
 
14
 
15
 
16
- os.environ["OPENAI_API_KEY"] = "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"
17
-
18
 
19
  today = datetime.today().strftime("%Y-%m-%d")
20
 
 
13
 
14
 
15
 
16
+ os.environ["OpenAI_key"]
 
17
 
18
  today = datetime.today().strftime("%Y-%m-%d")
19
 
getFlightData.py CHANGED
@@ -1,11 +1,12 @@
1
 
2
  import requests
 
3
 
4
  def getAccessToken():
5
  url = "https://api.lufthansa.com/v1/oauth/token"
6
  data = {
7
- "client_id": "gjjqt4jkk8mzyevvgt34fvev5",
8
- "client_secret": "f7HNDxETZY",
9
  "grant_type": "client_credentials"
10
  }
11
 
@@ -13,12 +14,7 @@ def getAccessToken():
13
 
14
  return response["access_token"]
15
 
16
- def extract_flight_info(info):
17
- flight = info['FlightStatusResource']['Flights']['Flight'][0]
18
- departure = flight['Departure']
19
- arrival = flight['Arrival']
20
- marketing_carrier = flight['MarketingCarrier']
21
-
22
 
23
 
24
  def getFlightInfo(flight_number, date):
 
1
 
2
  import requests
3
+ import os
4
 
5
  def getAccessToken():
6
  url = "https://api.lufthansa.com/v1/oauth/token"
7
  data = {
8
+ "client_id": os.environ['client_id'],
9
+ "client_secret": os.environ['client_secret'],
10
  "grant_type": "client_credentials"
11
  }
12
 
 
14
 
15
  return response["access_token"]
16
 
17
+
 
 
 
 
 
18
 
19
 
20
  def getFlightInfo(flight_number, date):