Open vyk1262 opened 1 year ago
Change the Teachable custom widget like this
onWebViewCreated: (InAppWebViewController controller) async {
var _webViewController = controller;
_webViewController.addJavaScriptHandler(
handlerName: "updater",
callback: (args) {
List<dynamic> predictions = args[0];
widget.results!(JsonEncoder().convert(predictions));
});
},
and use it as below
Teachable(
path: "assets/original.html",
results: (res) {
var resp = jsonDecode(res);
setState(() {
score = (resp[0] * 100.0)
.toString();
print(score);
});
},
),
with the above changes I am able to print probabilities of the issues
Is it because for pose --> mp[element["className"]] = element["probability"] is used but for audio result contains only ressult.scores. Can you please check main.dart
and index.html