surfiniaburger commited on
Commit
796eef1
·
1 Parent(s): 2cbbef6
Files changed (3) hide show
  1. README.md +10 -0
  2. app.py +1 -1
  3. knowledge_base.py +4 -0
README.md CHANGED
@@ -10,3 +10,13 @@ pinned: false
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+
14
+ ## Model Limitations and Known Issues
15
+
16
+ During self-evaluation, the model exhibited the following behaviors and limitations:
17
+
18
+ * **Performance Discrepancy:** The model performs well on maize plant images collected under direct sunlight (the primary training data source). However, its performance significantly degrades when evaluated on academic datasets, primarily due to the inconsistent quality and blurriness of images in these datasets.
19
+
20
+ * **Misclassification of Phosphorus Deficiency:** The model consistently fails to identify "phosphorus deficiency." Instead, it frequently misclassifies this condition as "leaf spot" or other unrelated diseases. This suggests a potential lack of robust features for phosphorus deficiency in the training data or an overfitting to other, more prevalent conditions.
21
+
22
+ These issues indicate a need for further data curation, augmentation, and potentially model retraining to improve generalization across diverse image conditions and accurate identification of all target diseases.
app.py CHANGED
@@ -356,7 +356,7 @@ def create_kb_management_ui():
356
  def rebuild_kb():
357
  yield "Rebuilding knowledge base..."
358
  try:
359
- KB.create_initial_index() # Call without arguments, as it now rebuilds from files
360
  yield "Knowledge base rebuilt successfully."
361
  except Exception as e:
362
  yield f"Error rebuilding knowledge base: {e}"
 
356
  def rebuild_kb():
357
  yield "Rebuilding knowledge base..."
358
  try:
359
+ KB.rebuild_from_default_files() # Call the new method to rebuild from default files
360
  yield "Knowledge base rebuilt successfully."
361
  except Exception as e:
362
  yield f"Error rebuilding knowledge base: {e}"
knowledge_base.py CHANGED
@@ -43,6 +43,10 @@ class KnowledgeBase:
43
  # This method now directly calls the external build_secure_index
44
  build_secure_index(documents_dict)
45
 
 
 
 
 
46
  def ingest_pdf(self, file_path, file_name):
47
  # This method now directly calls the external ingest_pdf
48
  ingest_pdf(file_path, file_name)
 
43
  # This method now directly calls the external build_secure_index
44
  build_secure_index(documents_dict)
45
 
46
+ def rebuild_from_default_files(self):
47
+ # This method orchestrates rebuilding the index from the default knowledge_base_data files
48
+ self._build_initial_knowledge_base()
49
+
50
  def ingest_pdf(self, file_path, file_name):
51
  # This method now directly calls the external ingest_pdf
52
  ingest_pdf(file_path, file_name)