Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,6 @@ def keyword_search_hf_spaces(query: str = "", limit: int = 3) -> Dict:
|
|
| 52 |
"trending_score": space.trending_score,
|
| 53 |
"source": "huggingface",
|
| 54 |
"configuration": {
|
| 55 |
-
"mcpServers": {
|
| 56 |
"gradio": {
|
| 57 |
"command": "npx", # Use npx to run MCP-Remote
|
| 58 |
"args": [
|
|
@@ -64,7 +63,6 @@ def keyword_search_hf_spaces(query: str = "", limit: int = 3) -> Dict:
|
|
| 64 |
}
|
| 65 |
}
|
| 66 |
}
|
| 67 |
-
}
|
| 68 |
results.append(space_info)
|
| 69 |
except Exception as e:
|
| 70 |
continue
|
|
@@ -145,7 +143,6 @@ def keyword_search_smithery(query: str = "", limit: int = 3, os_type: str = "Mac
|
|
| 145 |
# Create configuration based on OS type
|
| 146 |
if os_type == "Mac/Linux":
|
| 147 |
configuration = {
|
| 148 |
-
"mcpServers": {
|
| 149 |
f"{config_server_id}": {
|
| 150 |
"command": "npx",
|
| 151 |
"args": [
|
|
@@ -158,10 +155,8 @@ def keyword_search_smithery(query: str = "", limit: int = 3, os_type: str = "Mac
|
|
| 158 |
]
|
| 159 |
}
|
| 160 |
}
|
| 161 |
-
}
|
| 162 |
elif os_type == "Windows":
|
| 163 |
configuration = {
|
| 164 |
-
"mcpServers": {
|
| 165 |
f"{config_server_id}": {
|
| 166 |
"command": "cmd",
|
| 167 |
"args": [
|
|
@@ -176,10 +171,8 @@ def keyword_search_smithery(query: str = "", limit: int = 3, os_type: str = "Mac
|
|
| 176 |
]
|
| 177 |
}
|
| 178 |
}
|
| 179 |
-
}
|
| 180 |
elif os_type == "WSL":
|
| 181 |
configuration = {
|
| 182 |
-
"mcpServers": {
|
| 183 |
f"{config_server_id}": {
|
| 184 |
"command": "wsl",
|
| 185 |
"args": [
|
|
@@ -193,7 +186,6 @@ def keyword_search_smithery(query: str = "", limit: int = 3, os_type: str = "Mac
|
|
| 193 |
]
|
| 194 |
}
|
| 195 |
}
|
| 196 |
-
}
|
| 197 |
|
| 198 |
server_info = {
|
| 199 |
"id": server_id,
|
|
@@ -413,7 +405,6 @@ def semantic_search_smithery(query: str = "", limit: int = 3, os_type: str = "Ma
|
|
| 413 |
# Create configuration based on OS type
|
| 414 |
if os_type == "Mac/Linux":
|
| 415 |
configuration = {
|
| 416 |
-
"mcpServers": {
|
| 417 |
f"{config_server_id}": {
|
| 418 |
"command": "npx",
|
| 419 |
"args": [
|
|
@@ -426,10 +417,8 @@ def semantic_search_smithery(query: str = "", limit: int = 3, os_type: str = "Ma
|
|
| 426 |
]
|
| 427 |
}
|
| 428 |
}
|
| 429 |
-
}
|
| 430 |
elif os_type == "Windows":
|
| 431 |
configuration = {
|
| 432 |
-
"mcpServers": {
|
| 433 |
f"{config_server_id}": {
|
| 434 |
"command": "cmd",
|
| 435 |
"args": [
|
|
@@ -444,10 +433,8 @@ def semantic_search_smithery(query: str = "", limit: int = 3, os_type: str = "Ma
|
|
| 444 |
]
|
| 445 |
}
|
| 446 |
}
|
| 447 |
-
}
|
| 448 |
elif os_type == "WSL":
|
| 449 |
configuration = {
|
| 450 |
-
"mcpServers": {
|
| 451 |
f"{config_server_id}": {
|
| 452 |
"command": "wsl",
|
| 453 |
"args": [
|
|
@@ -461,7 +448,6 @@ def semantic_search_smithery(query: str = "", limit: int = 3, os_type: str = "Ma
|
|
| 461 |
]
|
| 462 |
}
|
| 463 |
}
|
| 464 |
-
}
|
| 465 |
|
| 466 |
server_info = {
|
| 467 |
"id": server_id,
|
|
|
|
| 52 |
"trending_score": space.trending_score,
|
| 53 |
"source": "huggingface",
|
| 54 |
"configuration": {
|
|
|
|
| 55 |
"gradio": {
|
| 56 |
"command": "npx", # Use npx to run MCP-Remote
|
| 57 |
"args": [
|
|
|
|
| 63 |
}
|
| 64 |
}
|
| 65 |
}
|
|
|
|
| 66 |
results.append(space_info)
|
| 67 |
except Exception as e:
|
| 68 |
continue
|
|
|
|
| 143 |
# Create configuration based on OS type
|
| 144 |
if os_type == "Mac/Linux":
|
| 145 |
configuration = {
|
|
|
|
| 146 |
f"{config_server_id}": {
|
| 147 |
"command": "npx",
|
| 148 |
"args": [
|
|
|
|
| 155 |
]
|
| 156 |
}
|
| 157 |
}
|
|
|
|
| 158 |
elif os_type == "Windows":
|
| 159 |
configuration = {
|
|
|
|
| 160 |
f"{config_server_id}": {
|
| 161 |
"command": "cmd",
|
| 162 |
"args": [
|
|
|
|
| 171 |
]
|
| 172 |
}
|
| 173 |
}
|
|
|
|
| 174 |
elif os_type == "WSL":
|
| 175 |
configuration = {
|
|
|
|
| 176 |
f"{config_server_id}": {
|
| 177 |
"command": "wsl",
|
| 178 |
"args": [
|
|
|
|
| 186 |
]
|
| 187 |
}
|
| 188 |
}
|
|
|
|
| 189 |
|
| 190 |
server_info = {
|
| 191 |
"id": server_id,
|
|
|
|
| 405 |
# Create configuration based on OS type
|
| 406 |
if os_type == "Mac/Linux":
|
| 407 |
configuration = {
|
|
|
|
| 408 |
f"{config_server_id}": {
|
| 409 |
"command": "npx",
|
| 410 |
"args": [
|
|
|
|
| 417 |
]
|
| 418 |
}
|
| 419 |
}
|
|
|
|
| 420 |
elif os_type == "Windows":
|
| 421 |
configuration = {
|
|
|
|
| 422 |
f"{config_server_id}": {
|
| 423 |
"command": "cmd",
|
| 424 |
"args": [
|
|
|
|
| 433 |
]
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 436 |
elif os_type == "WSL":
|
| 437 |
configuration = {
|
|
|
|
| 438 |
f"{config_server_id}": {
|
| 439 |
"command": "wsl",
|
| 440 |
"args": [
|
|
|
|
| 448 |
]
|
| 449 |
}
|
| 450 |
}
|
|
|
|
| 451 |
|
| 452 |
server_info = {
|
| 453 |
"id": server_id,
|