onnxruntime/js/react_native/ios/OnnxruntimeModule.h
Rachel Guo 6a6091a519
[rn] Add support for loading model from buffer on iOS (#13802)
### Description
<!-- Describe your changes. -->

-Add support for loading model from buffer on iOS
-Update OnnxruntimeModuleTest to use updated loadModelFromBuffer
Based on #12676

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Issue: #12500

---------

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
2023-04-28 17:34:26 -07:00

24 lines
658 B
Objective-C

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef OnnxruntimeModule_h
#define OnnxruntimeModule_h
#import <React/RCTBridgeModule.h>
@interface OnnxruntimeModule : NSObject<RCTBridgeModule>
-(NSDictionary*)loadModel:(NSString*)modelPath
options:(NSDictionary*)options;
-(NSDictionary*)loadModelFromBuffer:(NSData*)modelData
options:(NSDictionary*)options;
-(NSDictionary*)run:(NSString*)url
input:(NSDictionary*)input
output:(NSArray*)output
options:(NSDictionary*)options;
@end
#endif /* OnnxruntimeModule_h */