File tree Expand file tree Collapse file tree 5 files changed +18
-36
lines changed 
Sources/PerfectTensorFlowDemo Expand file tree Collapse file tree 5 files changed +18
-36
lines changed Original file line number Diff line number Diff line change 11.DS_Store 
2- /.build 
3- /.build_lin 
2+ /.build * 
43/Packages 
54/* .xcodeproj 
65* .pins 
76* .pb 
7+ /* .resolved 
8+ /* .pins 
9+ /* .orig 
10+ /* _deploy 
11+ /.package * 
Load Diff This file was deleted. 
Original file line number Diff line number Diff line change 1- //
2- //  Package.swift
3- //  Perfect-TensorFlow-Demo-Computer Vision
4- //
5- //  Created by Rockford Wei on 2017-06-19.
6- //  Copyright © 2017 PerfectlySoft. All rights reserved.
7- //
8- //===----------------------------------------------------------------------===//
9- //
10- // This source file is part of the Perfect.org open source project
11- //
12- // Copyright (c) 2017 - 2018 PerfectlySoft Inc. and the Perfect project authors
13- // Licensed under Apache License v2.0
14- //
15- // See http://perfect.org/licensing.html for license information
16- //
17- //===----------------------------------------------------------------------===//
18- //
19- 
1+ // swift-tools-version:4.0
2+ // The swift-tools-version declares the minimum version of Swift required to build this package.
203
214import  PackageDescription
225
236let  package =  Package ( 
247    name:  " PerfectTensorFlowDemo " , 
258    dependencies:  [ 
26-       . Package( url:  " https://github.com/PerfectlySoft/Perfect-HTTPServer.git " ,  majorVersion:  2 ) , 
27-       . Package( url:  " https://github.com/PerfectlySoft/Perfect-TensorFlow.git " ,  majorVersion:  1 ) 
9+         . package ( url:  " https://github.com/PerfectlySoft/Perfect-HTTPServer.git " ,  from:  " 3.0.0 " ) , 
10+         . package ( url:  " https://github.com/PerfectlySoft/Perfect-TensorFlow.git " ,  from:  " 1.4.0 " ) , 
11+     ] , 
12+     targets:  [ 
13+         . target( 
14+             name:  " PerfectTensorFlowDemo " , 
15+             dependencies:  [ " PerfectHTTPServer " ,  " PerfectTensorFlow " ] ) , 
2816    ] 
2917) 
Original file line number Diff line number Diff line change 164164  fModel. close ( ) 
165165  try . open ( . read) 
166166  let  lines  =  try . readString ( ) 
167-   tags =  lines. utf8 . split ( separator:  10 ) . map  {  String ( describing:  $0)  } 
167+   tags =  lines. split ( separator:  " \n " ) . map  {  String ( describing:  $0)  } 
168168  try TF . Open ( ) 
169169  inceptionModel =  try LabelImage (  Data ( bytes:  modelBytes)  ) 
170170  print ( " library ready " ) 
Original file line number Diff line number Diff line change 11OSABR=$( echo $( uname) | tr ' [:upper:]' ' [:lower:]' ) 
2- VERSION=1.3 .0
2+ VERSION=1.4 .0
33DWN=/tmp/libtensorflow.tgz
44URL=https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-$OSABR -x86_64-$VERSION .tar.gz
55echo  $URL 
66wget $URL  -O $DWN 
7- sudo  tar xvf $DWN  -C /usr/local ./lib/libtensorflow.so
7+ tar xvf $DWN  -C /usr/local ./lib/libtensorflow.so ./lib/libtensorflow_framework .so
88rm -f $DWN 
99echo  ' download AI model' 
1010wget https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -O /tmp/in.zip
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments