File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 1+ FROM perfectlysoft/perfectassistant:3.1
2+ # Perfect-COpenSSL-Linux.git--5093232834563591861/PADockerfile
3+ RUN apt-get -y update && apt-get install -y libssl-dev
4+
5+ # Perfect-LinuxBridge.git-1581036685432548022/PADockerfile
6+ RUN apt-get -y update && apt-get install -y uuid-dev
7+
8+ # Perfect-TensorFlow.git--7585565079711099406/PADockerfile
9+ RUN wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.2.0.tar.gz -O /tmp/tflib.tgz && tar xvf /tmp/tflib.tgz -C /usr/local ./lib/libtensorflow.so && rm /tmp/tflib.tgz
10+ RUN rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -88,36 +88,36 @@ func handler(data: [String:Any]) throws -> RequestHandler {
8888 let scanner = inceptionModel
8989 else {
9090 response. setHeader ( . contentType, value: " text/json " )
91- . appendBody ( string: " { \" value \" : \" Invalid Input \" } " )
92- . completed ( )
91+ response . appendBody ( string: " { \" value \" : \" Invalid Input \" } " )
92+ response . completed ( )
9393 return
9494 } //end
9595 let jpeg = Data . From ( b64)
9696 guard let data = Data ( base64Encoded: jpeg) else {
9797 response. setHeader ( . contentType, value: " text/json " )
98- . appendBody ( string: " { \" value \" : \" Input is not a valid jpeg \" } " )
99- . completed ( )
98+ response . appendBody ( string: " { \" value \" : \" Input is not a valid jpeg \" } " )
99+ response . completed ( )
100100 return
101101 } //end guard
102102
103103 do {
104104 let result = try scanner. match ( image: data)
105105 guard result. 0 > - 1 && result. 0 < tags. count else {
106106 response. setHeader ( . contentType, value: " text/json " )
107- . appendBody ( string: " { \" value \" : \" what is this??? \" } " )
108- . completed ( )
107+ response . appendBody ( string: " { \" value \" : \" what is this??? \" } " )
108+ response . completed ( )
109109 return
110110 } //end
111111 let tag = tags [ result. 0 ]
112112 let p = result. 1
113113 response. setHeader ( . contentType, value: " text/json " )
114- . appendBody ( string: " { \" value \" : \" Is it a \( tag) ? (Possibility: \( p) %) \" } " )
115- . completed ( )
114+ response . appendBody ( string: " { \" value \" : \" Is it a \( tag) ? (Possibility: \( p) %) \" } " )
115+ response . completed ( )
116116 print ( tag, p)
117117 } catch {
118118 response. setHeader ( . contentType, value: " text/json " )
119- . appendBody ( string: " { \" value \" : \" \( error) \" } " )
120- . completed ( )
119+ response . appendBody ( string: " { \" value \" : \" \( error) \" } " )
120+ response . completed ( )
121121 print ( " \( error) " )
122122 }
123123 }
You can’t perform that action at this time.
0 commit comments