private static void ImageContentBatch(String token, String endpoint) { String dataUrl1 = "https://ais-sample-data.obs.cn-north-1.myhuaweicloud.com/terrorism.jpg"; // The obs url of file String dataUrl2 = "https://ais-sample-data.obs.cn-north-1.myhuaweicloud.com/antiporn.jpg"; JArray urls = new JArray(); urls.Add(dataUrl1); urls.Add(dataUrl2); float threshold = 0.6f; JArray categories = new JArray(); // The scene of detect categories.Add("politics"); categories.Add("terrorism"); categories.Add("p**n"); String reslut = Moderation.ImageContentBatchToken(token, urls, threshold, categories, endpoint); Console.WriteLine(reslut); Console.ReadKey(); }
private static void ImageContentBatch(String token, String endpoint) { // The OBS link must match the region, and the OBS resources of different regions are not shared String dataUrl1 = "https://ais-sample-data.obs.cn-north-1.myhuaweicloud.com/terrorism.jpg"; String dataUrl2 = "https://ais-sample-data.obs.cn-north-1.myhuaweicloud.com/antiporn.jpg"; JArray urls = new JArray(); urls.Add(dataUrl1); urls.Add(dataUrl2); float threshold = 0.6f; JArray categories = new JArray(); categories.Add("politics"); categories.Add("terrorism"); categories.Add("p**n"); String reslut = Moderation.ImageContentBatchToken(token, urls, threshold, categories, endpoint); Console.WriteLine(reslut); Console.ReadKey(); }