Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,9 @@ import os
|
|
| 5 |
import cv2
|
| 6 |
from PIL import Image
|
| 7 |
import tensorflow as tf
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
fp0 = np.zeros((96, 128), dtype = np.uint8)
|
| 10 |
|
|
@@ -133,7 +136,8 @@ def update_button(filepath, z):
|
|
| 133 |
return filepath_show, [filepath], fp0, fp0
|
| 134 |
|
| 135 |
def detect_cells(filepath, z):
|
| 136 |
-
model = tf.keras.models.load_model('./model_positions', compile=False)
|
|
|
|
| 137 |
|
| 138 |
img = tiff.imread(filepath)
|
| 139 |
|
|
|
|
| 5 |
import cv2
|
| 6 |
from PIL import Image
|
| 7 |
import tensorflow as tf
|
| 8 |
+
from transformers import AutoModel
|
| 9 |
+
|
| 10 |
+
|
| 11 |
|
| 12 |
fp0 = np.zeros((96, 128), dtype = np.uint8)
|
| 13 |
|
|
|
|
| 136 |
return filepath_show, [filepath], fp0, fp0
|
| 137 |
|
| 138 |
def detect_cells(filepath, z):
|
| 139 |
+
#model = tf.keras.models.load_model('./model_positions', compile=False)
|
| 140 |
+
model = AutoModel.from_pretrained('./model_positions')
|
| 141 |
|
| 142 |
img = tiff.imread(filepath)
|
| 143 |
|