Spaces:
Sleeping
Sleeping
reqs, app
Browse files- app.py +1 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -38,7 +38,7 @@ def inference(img_dir):
|
|
| 38 |
image = np.array(Image.open(str(img_dir)).convert('L'))
|
| 39 |
image = transforms(image=image)['image']
|
| 40 |
with torch.inference_mode():
|
| 41 |
-
out = model(image).item()
|
| 42 |
out = out > 0
|
| 43 |
return "Fracture +" if out else "Fracture -"
|
| 44 |
|
|
|
|
| 38 |
image = np.array(Image.open(str(img_dir)).convert('L'))
|
| 39 |
image = transforms(image=image)['image']
|
| 40 |
with torch.inference_mode():
|
| 41 |
+
out = model(image.unsqueeze(0)).item()
|
| 42 |
out = out > 0
|
| 43 |
return "Fracture +" if out else "Fracture -"
|
| 44 |
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
albumentations
|
| 2 |
-
torch
|
|
|
|
|
|
| 1 |
albumentations
|
| 2 |
+
torch
|
| 3 |
+
transformers
|