Turing311 commited on
Commit
8234d75
·
1 Parent(s): 76d5ed8
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -1,9 +1,5 @@
1
  import sys
2
  sys.path.append('.')
3
- print("=======================1")
4
- #import time
5
- #time.sleep(5)
6
- print("=======================2")
7
 
8
  from flask import Flask, render_template, request, jsonify, send_from_directory
9
  from time import gmtime, strftime
@@ -27,8 +23,8 @@ app = Flask(__name__)
27
  ocrHWID = TTVOcrGetHWID()
28
  print('ocr hwid: ', ocrHWID.decode('utf-8'))
29
 
30
- licensePath = os.path.abspath(os.path.dirname(__file__)) + '/ocrengine/dict/license.txt'
31
- ocrRet = TTVOcrSetActivation(licensePath.encode('utf-8'))
32
  print('ocr activation: ', ocrRet.decode('utf-8'))
33
 
34
  dictPath = os.path.abspath(os.path.dirname(__file__)) + '/ocrengine/dict'
 
1
  import sys
2
  sys.path.append('.')
 
 
 
 
3
 
4
  from flask import Flask, render_template, request, jsonify, send_from_directory
5
  from time import gmtime, strftime
 
23
  ocrHWID = TTVOcrGetHWID()
24
  print('ocr hwid: ', ocrHWID.decode('utf-8'))
25
 
26
+ licenseKey = os.environ.get("LICENSE_KEY")
27
+ ocrRet = TTVOcrSetActivation(licenseKey.encode('utf-8'))
28
  print('ocr activation: ', ocrRet.decode('utf-8'))
29
 
30
  dictPath = os.path.abspath(os.path.dirname(__file__)) + '/ocrengine/dict'