guohanghui commited on
Commit
ea1ecc3
·
verified ·
1 Parent(s): c5459bd

Update pest/mcp_output/mcp_plugin/mcp_service.py

Browse files
pest/mcp_output/mcp_plugin/mcp_service.py CHANGED
@@ -47,13 +47,13 @@ def preprocess_image_tool(image_path: str) -> dict:
47
  return {"success": False, "result": None, "error": str(e)}
48
 
49
  @mcp.tool(name="detect_pest", description="Detect pests in an image using the loaded model")
50
- def detect_pest_tool(model: object, image_data: object) -> dict:
51
  """
52
  Detect pests in an image using the loaded model.
53
 
54
  Parameters:
55
- model (object): The loaded pest detection model.
56
- image_data (object): Preprocessed image data.
57
 
58
  Returns:
59
  dict: A dictionary containing success status and detection results.
 
47
  return {"success": False, "result": None, "error": str(e)}
48
 
49
  @mcp.tool(name="detect_pest", description="Detect pests in an image using the loaded model")
50
+ def detect_pest_tool(model: dict, image_data: dict) -> dict:
51
  """
52
  Detect pests in an image using the loaded model.
53
 
54
  Parameters:
55
+ model (dict): The loaded pest detection model.
56
+ image_data (dict): Preprocessed image data.
57
 
58
  Returns:
59
  dict: A dictionary containing success status and detection results.