avsolatorio commited on
Commit
1a8cb49
·
1 Parent(s): 6a8a4fa

Signed-off-by: Aivin V. Solatorio <avsolatorio@gmail.com>

Files changed (1) hide show
  1. wdi_mcp_server.py +0 -36
wdi_mcp_server.py CHANGED
@@ -69,41 +69,6 @@ def get_top_k(query: str, top_k: int = 10, fields: list[str] | None = None):
69
  return df.iloc[idx][fields].to_dict("records")
70
 
71
 
72
- # @mcp.tool()
73
- # async def generate_image(prompt: str, width: int = 512, height: int = 512) -> str:
74
- # """Generate an image using SanaSprint model.
75
-
76
- # Args:
77
- # prompt: Text prompt describing the image to generate
78
- # width: Image width (default: 512)
79
- # height: Image height (default: 512)
80
- # """
81
- # client = Client("https://ysharma-sanasprint.hf.space/")
82
-
83
- # try:
84
- # result = client.predict(
85
- # prompt, "0.6B", 0, True, width, height, 4.0, 2, api_name="/infer"
86
- # )
87
-
88
- # if isinstance(result, list) and len(result) >= 1:
89
- # image_data = result[0]
90
- # if isinstance(image_data, dict) and "url" in image_data:
91
- # return json.dumps(
92
- # {
93
- # "type": "image",
94
- # "url": image_data["url"],
95
- # "message": f"Generated image for prompt: {prompt}",
96
- # }
97
- # )
98
-
99
- # return json.dumps({"type": "error", "message": "Failed to generate image"})
100
-
101
- # except Exception as e:
102
- # return json.dumps(
103
- # {"type": "error", "message": f"Error generating image: {str(e)}"}
104
- # )
105
-
106
-
107
  class SearchOutput(BaseModel):
108
  idno: str = Field(..., description="The unique identifier of the indicator.")
109
  name: str = Field(..., description="The name of the indicator.")
@@ -175,7 +140,6 @@ async def get_wdi_data(
175
  Returns:
176
  A dictionary with keys `data` and `note`. The `data` key contains a list of indicator data entries requested. The `note` key contains a note about the data returned.
177
  """
178
- print("Hello...")
179
  MAX_INFO = 20
180
  note = ""
181
 
 
69
  return df.iloc[idx][fields].to_dict("records")
70
 
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  class SearchOutput(BaseModel):
73
  idno: str = Field(..., description="The unique identifier of the indicator.")
74
  name: str = Field(..., description="The name of the indicator.")
 
140
  Returns:
141
  A dictionary with keys `data` and `note`. The `data` key contains a list of indicator data entries requested. The `note` key contains a note about the data returned.
142
  """
 
143
  MAX_INFO = 20
144
  note = ""
145