MaziyarPanahi commited on
Commit
34c8f4b
·
verified ·
1 Parent(s): 6d7c6de

Document OpenMed cross-platform inference

Browse files
Files changed (1) hide show
  1. README.md +23 -0
README.md CHANGED
@@ -11,6 +11,29 @@ tags:
11
 
12
  This model card is rendered from the OpenMed model manifest. Update `models.jsonl` and rerun the publish step instead of editing this file directly.
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ## Manifest Summary
15
 
16
  | Field | Value |
 
11
 
12
  This model card is rendered from the OpenMed model manifest. Update `models.jsonl` and rerun the publish step instead of editing this file directly.
13
 
14
+ ## OpenMed in Python on CPU
15
+
16
+ ```python
17
+ from openmed import OnnxModel
18
+ model = OnnxModel.from_pretrained("OpenMed/OpenMed-NER-ChemicalDetect-BioMed-335M-v1-onnx-android")
19
+ entities = model("Patient Alice Nguyen was seen in cardiology.")
20
+ ```
21
+
22
+ ## OpenMed in Web
23
+
24
+ ```typescript
25
+ import { loadOnnxModel } from "@openmed/openmedkit-web";
26
+ const model = await loadOnnxModel("OpenMed/OpenMed-NER-ChemicalDetect-BioMed-335M-v1-onnx-android");
27
+ const entities = await model("Patient Alice Nguyen was seen in cardiology.");
28
+ ```
29
+
30
+ ## OpenMedKit for Android
31
+
32
+ ```kotlin
33
+ val model = OpenMedKit.fromDirectory(modelDirectory)
34
+ val entities = model.analyzeText("Patient Alice Nguyen was seen in cardiology.")
35
+ ```
36
+
37
  ## Manifest Summary
38
 
39
  | Field | Value |