Daniel Thompson commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -41,6 +41,16 @@ inputs = tokenizer("Name: Ellie Sutton Unit No: 677 917 812\\
|
|
| 41 |
|
| 42 |
# Get model predictions
|
| 43 |
outputs = model(**inputs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
```
|
| 45 |
|
| 46 |
For Tensorflow:
|
|
@@ -57,6 +67,16 @@ inputs = tokenizer("Name: Ellie Sutton Unit No: 677 917 812\\
|
|
| 57 |
|
| 58 |
# Get model predictions
|
| 59 |
outputs = model(**inputs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
```
|
| 61 |
|
| 62 |
## Training and evaluation data
|
|
|
|
| 41 |
|
| 42 |
# Get model predictions
|
| 43 |
outputs = model(**inputs)
|
| 44 |
+
|
| 45 |
+
# Get predicted class
|
| 46 |
+
predicted_class_idx = np.argmax(outputs.logits[0]).item()
|
| 47 |
+
|
| 48 |
+
# Define class labels
|
| 49 |
+
id2label = {0: "non-vascular", 1: "vascular"}
|
| 50 |
+
|
| 51 |
+
# Get predicted class label
|
| 52 |
+
predicted_class_label = id2label[predicted_class_idx]
|
| 53 |
+
print(predicted_class_label)
|
| 54 |
```
|
| 55 |
|
| 56 |
For Tensorflow:
|
|
|
|
| 67 |
|
| 68 |
# Get model predictions
|
| 69 |
outputs = model(**inputs)
|
| 70 |
+
|
| 71 |
+
# Get predicted class
|
| 72 |
+
predicted_class_idx = np.argmax(outputs.logits[0]).item()
|
| 73 |
+
|
| 74 |
+
# Define class labels
|
| 75 |
+
id2label = {0: "non-vascular", 1: "vascular"}
|
| 76 |
+
|
| 77 |
+
# Get predicted class label
|
| 78 |
+
predicted_class_label = id2label[predicted_class_idx]
|
| 79 |
+
print(predicted_class_label)
|
| 80 |
```
|
| 81 |
|
| 82 |
## Training and evaluation data
|