Guest User

Untitled

a guest
May 22nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Status = "Analyzing picture...";
  2. var tags = await CrossImageClassifier.Current.ClassifyImage(new MemoryStream(_imageBytes));
  3.  
  4. var description = "";
  5. foreach(var tag in tags.Where(t => t.Probability > .70))
  6. description += $"{tag.Tag} - {tag.Probability.ToString("P")}, ";
  7.  
  8. if (string.IsNullOrWhiteSpace(description))
  9. description = "No tags found";
  10.  
  11. Status = description.Trim().TrimEnd(',');
Add Comment
Please, Sign In to add comment