CheRy01 commited on
Commit
086042c
1 Parent(s): 974237b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,9 +5,6 @@ from PIL import Image
5
  from roboflow import Roboflow
6
  from ultralytics import YOLO
7
 
8
- file_path = 'best.pt'
9
- model = load_model(file_path)
10
-
11
  def load_model(file_path):
12
  # Load the Roboflow model
13
  rf = Roboflow(api_key="K1TXQnJq7EE7yoCf1g3C")
@@ -21,6 +18,9 @@ def load_model(file_path):
21
 
22
  return model
23
 
 
 
 
24
  def predict_fracture(image):
25
  # Preprocess the image for the Roboflow model
26
  img = Image.fromarray(image)
 
5
  from roboflow import Roboflow
6
  from ultralytics import YOLO
7
 
 
 
 
8
  def load_model(file_path):
9
  # Load the Roboflow model
10
  rf = Roboflow(api_key="K1TXQnJq7EE7yoCf1g3C")
 
18
 
19
  return model
20
 
21
+ file_path = 'best.pt'
22
+ model = load_model(file_path)
23
+
24
  def predict_fracture(image):
25
  # Preprocess the image for the Roboflow model
26
  img = Image.fromarray(image)