victor HF Staff commited on
Commit
eaf41af
·
1 Parent(s): af5218b

Add 'Use with MCP' button that opens API view

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -211,6 +211,22 @@ with gr.Blocks(title="Web Search MCP Server") as demo:
211
  also test it manually below.
212
  """
213
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
 
215
  with gr.Row():
216
  with gr.Column(scale=3):
 
211
  also test it manually below.
212
  """
213
  )
214
+
215
+ gr.HTML(
216
+ """
217
+ <div style="margin: 16px 0;">
218
+ <a href="#"
219
+ onclick="window.location.href = window.location.pathname + '?view=api'; return false;"
220
+ style="display: inline-block; padding: 10px 20px; background-color: #1a1a2e; color: white; text-decoration: none; border-radius: 6px; font-weight: 500; border: 1px solid #333; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.2); cursor: pointer;"
221
+ onmouseover="this.style.backgroundColor='#16213e'; this.style.boxShadow='0 4px 8px rgba(0,0,0,0.3)';"
222
+ onmouseout="this.style.backgroundColor='#1a1a2e'; this.style.boxShadow='0 2px 4px rgba(0,0,0,0.2)';">
223
+ <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/use-with-mcp-lg-dark.svg"
224
+ alt="Use with MCP"
225
+ style="height: 20px; vertical-align: middle;">
226
+ </a>
227
+ </div>
228
+ """
229
+ )
230
 
231
  with gr.Row():
232
  with gr.Column(scale=3):