llsourcell / image_classifier_template Goto Github PK
View Code? Open in Web Editor NEWThis is the code for "Image Classifier Example" by Siraj Raval on Youtube
This is the code for "Image Classifier Example" by Siraj Raval on Youtube
void upload(File imageFile) async {
var stream =
new http.ByteStream(DelegatingStream.typed(imageFile.openRead()));
var length = await imageFile.length();
String base =
"https://your-render-app.onrender.com";
var uri = Uri.parse(base + '/analyze');
var request = new http.MultipartRequest("POST", uri);
var multipartFile = new http.MultipartFile('file', stream, length,
filename: basename(imageFile.path));
//contentType: new MediaType('image', 'png'));
request.files.add(multipartFile);
var response = await request.send();
print(response.statusCode);
response.stream.transform(utf8.decoder).listen((value) {
print(value);
int l = value.length;
txt = value;
setState(() {});
});
}
I don't know if it is important or not. I'm just started to investigate...
But this path is not valid for Windows android/app/src/main/java/com2/, because the com2
word is reserved by Windows operating system.
Well, it is example
file MainActivity.java
there. So I don't think it is important for the project.
However, there is an error during the unzip of saved ZIP project on Windows systems. Thus I thought that archive is corrupted.
Please, rename com2
directory or delete it from the project.
Two Flutter buttons named FloatingActionButton are overlapping when the screen is horizontal.
It was difficult to fix it in main.dart file because I've not worked with Flutter before.
floatingActionButton: Align(
// Align two buttons to right. Alignment to bottom doesn't work.
alignment: Alignment(1.0, 0),
child: Column(
// Align two buttons to bottom. There is no alignment to right.
mainAxisAlignment: MainAxisAlignment.end,
children: [
Padding(
// Set padding between buttons
padding: const EdgeInsets.only(bottom: 10.0),
// Use camera button
child: FloatingActionButton(
onPressed: (){
image_picker(0);
},
child: new Icon(Icons.camera_alt),
),
),
// Upload image button
FloatingActionButton(
onPressed: (){
image_picker(1);
},
child: new Icon(Icons.file_upload)
)
],
),
),
P.S. My version of your starup is here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.