cadyderwin commited on
Commit
104bfa6
·
verified ·
1 Parent(s): 21faf3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -14,15 +14,15 @@ from opyidrecog import setLicenseKey
14
  from opyidrecog import initSDK
15
  from opyidrecog import processImage
16
 
17
- licenseKeyPath = "license.txt"
18
- license = ""
19
-
20
- try:
21
- with open(licenseKeyPath, 'r') as file:
22
- license = file.read().strip()
23
- except IOError as exc:
24
- print("failed to open license.txt: ", exc.errno)
25
- print("License Key: ", license)
26
 
27
  hwid = getHWID()
28
  print("HWID: ", hwid.decode('utf-8'))
 
14
  from opyidrecog import initSDK
15
  from opyidrecog import processImage
16
 
17
+ license = os.environ.get("LICENSE_KEY")
18
+
19
+ if license is None:
20
+ try:
21
+ with open(licenseKeyPath, 'r') as file:
22
+ license = file.read().strip()
23
+ except IOError as exc:
24
+ print("failed to open license.txt: ", exc.errno)
25
+ print("License Key: ", license)
26
 
27
  hwid = getHWID()
28
  print("HWID: ", hwid.decode('utf-8'))