Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- selectImage = () => {
- const options = {
- title: 'Select Image',
- storageOptions: {
- skipBackup: true,
- path: 'images',
- },
- };
- ImagePicker.showImagePicker(options, (response) => {
- console.log('Response = ', response);
- if (response.didCancel) {
- console.log('User cancelled image picker');
- } else if (response.error) {
- console.log('ImagePicker Error: ', response.error);
- } else if (response.customButton) {
- console.log('User tapped custom button: ', response.customButton);
- } else {
- const source = { uri: response.uri };
- this.setState({
- image: source,
- predictions: null
- });
- this.classifyImage()
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement