Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,14 +6,12 @@ import fitz
|
|
| 6 |
from PIL import Image
|
| 7 |
import cv2
|
| 8 |
import numpy as np
|
| 9 |
-
import sys
|
| 10 |
import pilecaps_adr
|
| 11 |
import base64
|
| 12 |
from db import dropbox_connect
|
| 13 |
import db
|
| 14 |
import cv2
|
| 15 |
import pandas as pd
|
| 16 |
-
import ast
|
| 17 |
import time
|
| 18 |
from io import BytesIO
|
| 19 |
from flask import Flask, Response
|
|
@@ -22,14 +20,16 @@ import tameem3_2
|
|
| 22 |
import pypdfium2 as pdfium
|
| 23 |
import pixelconversion
|
| 24 |
import tameem2_1
|
| 25 |
-
import urllib.request
|
| 26 |
import base64
|
| 27 |
import io
|
| 28 |
from urllib.parse import unquote
|
| 29 |
import API
|
|
|
|
|
|
|
|
|
|
| 30 |
app = Flask(__name__)
|
| 31 |
|
| 32 |
-
|
| 33 |
@app.route('/getprojectnames/',methods=['GET'])
|
| 34 |
def getprjnamesfromTestAPI():
|
| 35 |
prjnames=API.getPrjNames()
|
|
@@ -51,33 +51,22 @@ def getprjSectionsfromTestAPI(jsdata):
|
|
| 51 |
@app.route('/getmethod/<jsdata>',methods=['GET','POST'])
|
| 52 |
def get_javascript_data(jsdata):
|
| 53 |
#get project from the first dropdown
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
#---------------------------------------------------------------
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
#get projects of 'project name'
|
| 61 |
-
|
| 62 |
-
if section.startswith('1.0'):
|
| 63 |
-
plans_inrepo=os.listdir('dropbox_plans/1.0')
|
| 64 |
-
elif section.startswith('3.2'):
|
| 65 |
-
plans_inrepo=os.listdir('dropbox_plans/3.2')
|
| 66 |
-
elif section.startswith('2.2'):
|
| 67 |
-
plans_inrepo=os.listdir('dropbox_plans/2.2')
|
| 68 |
-
elif section.startswith('2.1'):
|
| 69 |
-
plans_inrepo=os.listdir('dropbox_plans/2.1')
|
| 70 |
-
else:
|
| 71 |
-
return ''
|
| 72 |
-
#if 'foundation' in radio and project in plans_inrepo
|
| 73 |
-
matches=[]
|
| 74 |
-
if section==None:
|
| 75 |
-
print('no proj')
|
| 76 |
-
else:
|
| 77 |
-
for x in plans_inrepo:
|
| 78 |
-
matches.append(x)
|
| 79 |
-
print(matches)
|
| 80 |
-
return matches
|
| 81 |
#_________________________________________________________________________________________________________________________
|
| 82 |
#_________________________________________________________________________________________________________________________
|
| 83 |
#NOT IMP NOW
|
|
@@ -101,16 +90,16 @@ def hexRGB(color):
|
|
| 101 |
def stringToRGB():
|
| 102 |
name = request.get_json()
|
| 103 |
vv=name.get('allvalues')
|
|
|
|
|
|
|
| 104 |
if vv[1]==220:
|
| 105 |
imgdata = base64.b64decode(vv[6])
|
| 106 |
img=Image.open(io.BytesIO(imgdata))
|
| 107 |
opencv_img= cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)
|
| 108 |
else:
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
# cv2.imwrite('img.png', opencv_img)
|
| 113 |
-
# return opencv_img
|
| 114 |
return jsonify(arr)
|
| 115 |
|
| 116 |
@app.route('/2.1Trial/',methods=["POST"])
|
|
@@ -121,7 +110,7 @@ def measure2_1():
|
|
| 121 |
return arr
|
| 122 |
#MAIN FUNCTION -- calls python code to measure the chosen plan from the interface
|
| 123 |
# @app.route('/projecttomeasure/<jsdata>',methods=["GET","POST"])
|
| 124 |
-
def measureproject(result,img=0):
|
| 125 |
colorarr=[]
|
| 126 |
# result = json.loads(jsdata)
|
| 127 |
pdfpath='/'
|
|
@@ -137,7 +126,7 @@ def measureproject(result,img=0):
|
|
| 137 |
c=hexRGB(item)
|
| 138 |
colorarr.append(c)
|
| 139 |
print('RATIOS=',result[3], result[4])
|
| 140 |
-
imgPerimeter1,image_new1,SimilarAreaDictionary , colorsUsed,spreadsheet_url, spreadsheetId,list1, pdflink, areas_Perimeters, namepathArr =pilecaps_adr.drawAllContours(img,result[1],colorarr, result[3], result[4],'area', result[0],pdfpath)
|
| 141 |
_, buffer = cv2.imencode('.png', image_new1)
|
| 142 |
arr=[base64.b64encode(buffer).decode('utf-8'),SimilarAreaDictionary.to_dict(),spreadsheet_url , spreadsheetId,colorsUsed,list1.to_dict(), pdflink, areas_Perimeters, namepathArr]
|
| 143 |
################################# -3.2- #################################
|
|
@@ -170,26 +159,26 @@ def measureproject(result,img=0):
|
|
| 170 |
|
| 171 |
@app.route("/canvaspdftoimgBackground/<jsdata>",methods=["GET", "POST"])
|
| 172 |
def pdftoimgCanvas(jsdata):
|
| 173 |
-
img=plan2img(
|
| 174 |
-
# img=cv2.resize(img, (0, 0), fx = 0.5, fy = 0.5)
|
| 175 |
-
# print('imgdone','dropbox_plans/1.0/'+jsdata )
|
| 176 |
-
|
| 177 |
_, buffer = cv2.imencode('.png', img)
|
| 178 |
arr=[base64.b64encode(buffer).decode('utf-8') , img.shape[0],img.shape[1]]
|
| 179 |
return jsonify(arr)
|
| 180 |
|
| 181 |
|
| 182 |
#pdf to img
|
| 183 |
-
def plan2img(
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
page=doc[0]
|
| 187 |
pix = page.get_pixmap(dpi=300) # render page to an image
|
| 188 |
pl=Image.frombytes('RGB', [pix.width,pix.height],pix.samples)
|
| 189 |
img=np.array(pl)
|
| 190 |
-
print(img.shape)
|
| 191 |
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
| 192 |
-
return img
|
| 193 |
#_________________________________________________________________________________________________________________________
|
| 194 |
#_________________________________________________________________________________________________________________________
|
| 195 |
|
|
@@ -209,8 +198,8 @@ def convert2img(path):
|
|
| 209 |
def sendmctnametoLegend(jsdata):
|
| 210 |
result = json.loads(jsdata)
|
| 211 |
print(result)
|
| 212 |
-
summaryid
|
| 213 |
-
allreturns=[summaryid
|
| 214 |
return jsonify(allreturns)
|
| 215 |
#_________________________________________________________________________________________________________________________
|
| 216 |
#_________________________________________________________________________________________________________________________
|
|
@@ -273,39 +262,17 @@ def modifyingcalcRefDynamic(img):
|
|
| 273 |
#PIXEL CONVERSION METHOD -- SAVES DOC ON DROPBOX TO BE MEASURED BY USER
|
| 274 |
@app.route("/pixelimg/<jsdata>",methods=["GET", "POST"])
|
| 275 |
def getimg(jsdata):
|
| 276 |
-
|
| 277 |
-
print(jsdata)
|
| 278 |
jsdata=eval(jsdata)
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
return ''
|
| 289 |
-
for page in doc:
|
| 290 |
-
|
| 291 |
-
pix = page.get_pixmap() # render page to an image
|
| 292 |
-
pl=Image.frombytes('RGB', [pix.width,pix.height],pix.samples)
|
| 293 |
-
img=np.array(pl)
|
| 294 |
-
print(img.shape)
|
| 295 |
-
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
| 296 |
-
if jsdata[2].startswith('1.0'):
|
| 297 |
-
doc=pixelconversion.openDrawPDF(path='dropbox_plans/1.0/'+str(jsdata[3]))
|
| 298 |
-
elif jsdata[2].startswith('3.2'):
|
| 299 |
-
doc=pixelconversion.openDrawPDF(path='dropbox_plans/3.2/'+str(jsdata[3]))
|
| 300 |
-
elif jsdata[2].startswith('2.2'):
|
| 301 |
-
doc=pixelconversion.openDrawPDF(path='dropbox_plans/2.2/'+str(jsdata[3]))
|
| 302 |
-
elif jsdata[2].startswith('2.1'):
|
| 303 |
-
doc=pixelconversion.openDrawPDF(path='dropbox_plans/2.1/'+str(jsdata[3]))
|
| 304 |
-
pdfpath='/'+jsdata[0]+'/'+jsdata[1]+'/'+jsdata[2]+'/'+'Scale Document' +'/'
|
| 305 |
-
dburl=db.dropbox_upload_file(doc=doc,pdfname=str(jsdata[3]) ,pdfpath=pdfpath,flag=1)
|
| 306 |
-
areaPixel,perimeterPixel= pixelconversion.getAreaPerimeter(pdfpath, str(jsdata[3]))
|
| 307 |
-
|
| 308 |
-
print(areaPixel,perimeterPixel)
|
| 309 |
outputs=[areaPixel,perimeterPixel , dburl]
|
| 310 |
return jsonify(outputs)
|
| 311 |
|
|
@@ -323,8 +290,8 @@ def getnewlegend():
|
|
| 323 |
for word in eval(pdfpathpath):
|
| 324 |
pdfpth+='/' +word
|
| 325 |
pdfpth+='/'
|
| 326 |
-
|
| 327 |
-
|
| 328 |
arr1=[deletedrows1.to_dict()]
|
| 329 |
return jsonify(arr1)
|
| 330 |
#---------------------------------------------------------------------------
|
|
@@ -363,11 +330,7 @@ def dltmarkupslegend():
|
|
| 363 |
#get pdf dropbox url after measurement is done
|
| 364 |
@app.route('/getdropboxurl/<jsdata>',methods=["GET", "POST"])
|
| 365 |
def calldropboxurl(jsdata):
|
| 366 |
-
|
| 367 |
-
for word in eval(jsdata):
|
| 368 |
-
pdfpth+='/' +word
|
| 369 |
-
print(pdfpth)
|
| 370 |
-
pdfurl=db.dropbox_shareableLink(pdfpth)
|
| 371 |
return jsonify(pdfurl)
|
| 372 |
|
| 373 |
#_________________________________________________________________________________________________________________________
|
|
@@ -378,7 +341,6 @@ def getlinkscreated(jsdata):
|
|
| 378 |
spreadsheet_service,drive_service,gc= pilecaps_adr.authorizeLegend()
|
| 379 |
ids=gc.spreadsheet_ids()
|
| 380 |
titles=gc.spreadsheet_titles()
|
| 381 |
-
|
| 382 |
allpaths=[]
|
| 383 |
# for title in titles:
|
| 384 |
for i in range(0,len(titles)):
|
|
@@ -387,7 +349,13 @@ def getlinkscreated(jsdata):
|
|
| 387 |
allpaths.append([titles[i], ws.get_developer_metadata('path')[0].value , drive_service.files().get(fileId=ids[i],fields="createdTime, modifiedTime").execute() ,ids[i] ])
|
| 388 |
|
| 389 |
return jsonify(allpaths)
|
| 390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 391 |
#_________________________________________________________________________________________________________________________
|
| 392 |
#_________________________________________________________________________________________________________________________
|
| 393 |
|
|
@@ -396,8 +364,7 @@ def getlinkscreated(jsdata):
|
|
| 396 |
|
| 397 |
#_________________________________________________________________________________________________________________________
|
| 398 |
#_________________________________________________________________________________________________________________________
|
|
|
|
|
|
|
| 399 |
|
| 400 |
-
if __name__ == "__main__":
|
| 401 |
-
app.run(host="0.0.0.0", port=7860)
|
| 402 |
|
| 403 |
-
|
|
|
|
| 6 |
from PIL import Image
|
| 7 |
import cv2
|
| 8 |
import numpy as np
|
|
|
|
| 9 |
import pilecaps_adr
|
| 10 |
import base64
|
| 11 |
from db import dropbox_connect
|
| 12 |
import db
|
| 13 |
import cv2
|
| 14 |
import pandas as pd
|
|
|
|
| 15 |
import time
|
| 16 |
from io import BytesIO
|
| 17 |
from flask import Flask, Response
|
|
|
|
| 20 |
import pypdfium2 as pdfium
|
| 21 |
import pixelconversion
|
| 22 |
import tameem2_1
|
|
|
|
| 23 |
import base64
|
| 24 |
import io
|
| 25 |
from urllib.parse import unquote
|
| 26 |
import API
|
| 27 |
+
import MC_Templates_API
|
| 28 |
+
import tsadropboxretrieval
|
| 29 |
+
|
| 30 |
app = Flask(__name__)
|
| 31 |
|
| 32 |
+
|
| 33 |
@app.route('/getprojectnames/',methods=['GET'])
|
| 34 |
def getprjnamesfromTestAPI():
|
| 35 |
prjnames=API.getPrjNames()
|
|
|
|
| 51 |
@app.route('/getmethod/<jsdata>',methods=['GET','POST'])
|
| 52 |
def get_javascript_data(jsdata):
|
| 53 |
#get project from the first dropdown
|
| 54 |
+
# jsdata=eval(jsdata)
|
| 55 |
+
documnetsToMeasure,RelevantDocuments=tsadropboxretrieval.retrieveProjects(jsdata)
|
| 56 |
+
if documnetsToMeasure:
|
| 57 |
+
return jsonify ([documnetsToMeasure, RelevantDocuments])
|
| 58 |
+
else:
|
| 59 |
+
return ['No projects found']
|
| 60 |
#---------------------------------------------------------------
|
| 61 |
|
| 62 |
+
@app.route('/RetrieveMCTNames/<jsdata>',methods=['GET'])
|
| 63 |
+
def CallAPIforMCTNames(jsdata):
|
| 64 |
+
# print(jsdata)
|
| 65 |
+
DictionaryOfTemplates=MC_Templates_API.RetrieveMC_Templates_API()
|
| 66 |
+
jsdata=jsdata.replace('"', '')
|
| 67 |
+
return jsonify(DictionaryOfTemplates[str(jsdata).lower()])
|
| 68 |
#get projects of 'project name'
|
| 69 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
#_________________________________________________________________________________________________________________________
|
| 71 |
#_________________________________________________________________________________________________________________________
|
| 72 |
#NOT IMP NOW
|
|
|
|
| 90 |
def stringToRGB():
|
| 91 |
name = request.get_json()
|
| 92 |
vv=name.get('allvalues')
|
| 93 |
+
dataDoc = plan2img( str(vv[0]) )[1]
|
| 94 |
+
# vv[0] ->proj name, vv[1] (0/220),vv[2] ->colors , vv[3]->ratio1 , vv[4]->ratio2 , vv[5] -> pdfpath , vv[6] ->imgDrawnOn
|
| 95 |
if vv[1]==220:
|
| 96 |
imgdata = base64.b64decode(vv[6])
|
| 97 |
img=Image.open(io.BytesIO(imgdata))
|
| 98 |
opencv_img= cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)
|
| 99 |
else:
|
| 100 |
+
# vv[0] ->proj name, vv[1] (0/220),vv[2] ->colors , vv[3]->ratio1 , vv[4]->ratio2 , vv[5] -> pdfpath
|
| 101 |
+
opencv_img = plan2img( str(vv[0]) )[0]
|
| 102 |
+
arr=measureproject(vv,dataDoc,opencv_img)
|
|
|
|
|
|
|
| 103 |
return jsonify(arr)
|
| 104 |
|
| 105 |
@app.route('/2.1Trial/',methods=["POST"])
|
|
|
|
| 110 |
return arr
|
| 111 |
#MAIN FUNCTION -- calls python code to measure the chosen plan from the interface
|
| 112 |
# @app.route('/projecttomeasure/<jsdata>',methods=["GET","POST"])
|
| 113 |
+
def measureproject(result,dataDoc,img=0):
|
| 114 |
colorarr=[]
|
| 115 |
# result = json.loads(jsdata)
|
| 116 |
pdfpath='/'
|
|
|
|
| 126 |
c=hexRGB(item)
|
| 127 |
colorarr.append(c)
|
| 128 |
print('RATIOS=',result[3], result[4])
|
| 129 |
+
imgPerimeter1,image_new1,SimilarAreaDictionary , colorsUsed,spreadsheet_url, spreadsheetId,list1, pdflink, areas_Perimeters, namepathArr =pilecaps_adr.drawAllContours(dataDoc,img,result[1],colorarr, result[3], result[4],'area', result[0],pdfpath)
|
| 130 |
_, buffer = cv2.imencode('.png', image_new1)
|
| 131 |
arr=[base64.b64encode(buffer).decode('utf-8'),SimilarAreaDictionary.to_dict(),spreadsheet_url , spreadsheetId,colorsUsed,list1.to_dict(), pdflink, areas_Perimeters, namepathArr]
|
| 132 |
################################# -3.2- #################################
|
|
|
|
| 159 |
|
| 160 |
@app.route("/canvaspdftoimgBackground/<jsdata>",methods=["GET", "POST"])
|
| 161 |
def pdftoimgCanvas(jsdata):
|
| 162 |
+
img=plan2img(jsdata)[0]
|
|
|
|
|
|
|
|
|
|
| 163 |
_, buffer = cv2.imencode('.png', img)
|
| 164 |
arr=[base64.b64encode(buffer).decode('utf-8') , img.shape[0],img.shape[1]]
|
| 165 |
return jsonify(arr)
|
| 166 |
|
| 167 |
|
| 168 |
#pdf to img
|
| 169 |
+
def plan2img(nameofpdf):
|
| 170 |
+
|
| 171 |
+
pdfpath,pdflink=tsadropboxretrieval.getPathtoPDF_File(nameofPDF=nameofpdf)
|
| 172 |
+
dbxTeam= tsadropboxretrieval.ADR_Access_DropboxTeam('user')
|
| 173 |
+
md, res =dbxTeam.files_download(path=pdfpath)
|
| 174 |
+
data = res.content
|
| 175 |
+
doc = fitz.open("pdf",data)
|
| 176 |
page=doc[0]
|
| 177 |
pix = page.get_pixmap(dpi=300) # render page to an image
|
| 178 |
pl=Image.frombytes('RGB', [pix.width,pix.height],pix.samples)
|
| 179 |
img=np.array(pl)
|
|
|
|
| 180 |
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
| 181 |
+
return img ,data
|
| 182 |
#_________________________________________________________________________________________________________________________
|
| 183 |
#_________________________________________________________________________________________________________________________
|
| 184 |
|
|
|
|
| 198 |
def sendmctnametoLegend(jsdata):
|
| 199 |
result = json.loads(jsdata)
|
| 200 |
print(result)
|
| 201 |
+
summaryid=pilecaps_adr.mapnametoLegend(result)
|
| 202 |
+
allreturns=[summaryid]
|
| 203 |
return jsonify(allreturns)
|
| 204 |
#_________________________________________________________________________________________________________________________
|
| 205 |
#_________________________________________________________________________________________________________________________
|
|
|
|
| 262 |
#PIXEL CONVERSION METHOD -- SAVES DOC ON DROPBOX TO BE MEASURED BY USER
|
| 263 |
@app.route("/pixelimg/<jsdata>",methods=["GET", "POST"])
|
| 264 |
def getimg(jsdata):
|
| 265 |
+
|
|
|
|
| 266 |
jsdata=eval(jsdata)
|
| 267 |
+
pdfpath,pdflink=tsadropboxretrieval.getPathtoPDF_File(nameofPDF=jsdata[3])
|
| 268 |
+
dbxTeam= tsadropboxretrieval.ADR_Access_DropboxTeam('user')
|
| 269 |
+
md, res =dbxTeam.files_download(path=pdfpath)
|
| 270 |
+
data = res.content
|
| 271 |
+
doc=pixelconversion.openDrawPDF(data)
|
| 272 |
+
dbPath='/TSA Team Folder/ADR Test/'+jsdata[0]+'/'+jsdata[1]+'/'+jsdata[2]+'/'+'Scale Document' +'/'
|
| 273 |
+
dburl=tsadropboxretrieval.uploadanyFile(doc=doc,pdfname=str(jsdata[3]) ,path=dbPath)
|
| 274 |
+
areaPixel,perimeterPixel= pixelconversion.getAreaPerimeter(dbPath, str(jsdata[3]))
|
| 275 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
outputs=[areaPixel,perimeterPixel , dburl]
|
| 277 |
return jsonify(outputs)
|
| 278 |
|
|
|
|
| 290 |
for word in eval(pdfpathpath):
|
| 291 |
pdfpth+='/' +word
|
| 292 |
pdfpth+='/'
|
| 293 |
+
dbPath='/TSA Team Folder/ADR Test'+pdfpth+'Measured Plan/'
|
| 294 |
+
deletedrows1=pilecaps_adr.deletemarkups(list1=list1,dbPath=dbPath,path=path)
|
| 295 |
arr1=[deletedrows1.to_dict()]
|
| 296 |
return jsonify(arr1)
|
| 297 |
#---------------------------------------------------------------------------
|
|
|
|
| 330 |
#get pdf dropbox url after measurement is done
|
| 331 |
@app.route('/getdropboxurl/<jsdata>',methods=["GET", "POST"])
|
| 332 |
def calldropboxurl(jsdata):
|
| 333 |
+
pdfurl=tsadropboxretrieval.getPathtoPDF_File(nameofPDF=jsdata)[1]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 334 |
return jsonify(pdfurl)
|
| 335 |
|
| 336 |
#_________________________________________________________________________________________________________________________
|
|
|
|
| 341 |
spreadsheet_service,drive_service,gc= pilecaps_adr.authorizeLegend()
|
| 342 |
ids=gc.spreadsheet_ids()
|
| 343 |
titles=gc.spreadsheet_titles()
|
|
|
|
| 344 |
allpaths=[]
|
| 345 |
# for title in titles:
|
| 346 |
for i in range(0,len(titles)):
|
|
|
|
| 349 |
allpaths.append([titles[i], ws.get_developer_metadata('path')[0].value , drive_service.files().get(fileId=ids[i],fields="createdTime, modifiedTime").execute() ,ids[i] ])
|
| 350 |
|
| 351 |
return jsonify(allpaths)
|
| 352 |
+
#_________________________________________________________________________________________________________________________
|
| 353 |
+
#_________________________________________________________________________________________________________________________
|
| 354 |
+
@app.route('/getAPITables/',methods=["GET", "POST"])
|
| 355 |
+
def returnAPITables():
|
| 356 |
+
# API.update_df()
|
| 357 |
+
table1,table2,table3=API.GenerateTables()
|
| 358 |
+
return jsonify([table1.to_dict(),table2.to_dict(),table3.to_dict()])
|
| 359 |
#_________________________________________________________________________________________________________________________
|
| 360 |
#_________________________________________________________________________________________________________________________
|
| 361 |
|
|
|
|
| 364 |
|
| 365 |
#_________________________________________________________________________________________________________________________
|
| 366 |
#_________________________________________________________________________________________________________________________
|
| 367 |
+
if __name__ == "__main__":
|
| 368 |
+
app.run(debug=True)
|
| 369 |
|
|
|
|
|
|
|
| 370 |
|
|
|