MISSAOUI commited on
Commit
ac3246d
·
verified ·
1 Parent(s): f2fe17a

Update pages/LeafDiseaseDetection .py

Browse files
Files changed (1) hide show
  1. pages/LeafDiseaseDetection .py +3 -2
pages/LeafDiseaseDetection .py CHANGED
@@ -7,6 +7,9 @@ from groq import Groq
7
  client = Groq(
8
  api_key="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"
9
  )
 
 
 
10
 
11
  def process_diseases(diseases):
12
  unique_elements = sorted(set(diseases))
@@ -19,8 +22,6 @@ def process_diseases(diseases):
19
  def detect_image(image):
20
  detected_classes = []
21
  img_array = np.array(image)
22
-
23
- model = YOLO("models/yolo.pt")
24
  results = model(img_array)
25
 
26
  for result in results:
 
7
  client = Groq(
8
  api_key="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"
9
  )
10
+ import os
11
+ model_path = os.path.join(os.getcwd(), "yolo.pt")
12
+ model = YOLO(model_path)
13
 
14
  def process_diseases(diseases):
15
  unique_elements = sorted(set(diseases))
 
22
  def detect_image(image):
23
  detected_classes = []
24
  img_array = np.array(image)
 
 
25
  results = model(img_array)
26
 
27
  for result in results: