mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
Added machine learning microservice and object detection (#76)
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/modules/search/models/curated_location.model.dart';
|
||||
import 'package:immich_mobile/modules/search/models/curated_object.model.dart';
|
||||
import 'package:immich_mobile/shared/models/immich_asset.model.dart';
|
||||
import 'package:immich_mobile/shared/services/network.service.dart';
|
||||
|
||||
@@ -52,4 +53,19 @@ class SearchService {
|
||||
throw Error();
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<CuratedObject>?> getCuratedObjects() async {
|
||||
try {
|
||||
var res = await _networkService.getRequest(url: "asset/allObjects");
|
||||
|
||||
List<dynamic> decodedData = jsonDecode(res.toString());
|
||||
|
||||
List<CuratedObject> result = List.from(decodedData.map((a) => CuratedObject.fromMap(a)));
|
||||
|
||||
return result;
|
||||
} catch (e) {
|
||||
debugPrint("[ERROR] [CuratedObject] ${e.toString()}");
|
||||
throw Error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user