Update app.py
Browse files
app.py
CHANGED
|
@@ -220,6 +220,42 @@ with gr.Blocks(
|
|
| 220 |
**Built for the MCP 1st Birthday Hackathon** π
|
| 221 |
""")
|
| 222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
with gr.Row():
|
| 224 |
with gr.Column(scale=2):
|
| 225 |
gr.Markdown("### π Input")
|
|
@@ -249,18 +285,23 @@ with gr.Blocks(
|
|
| 249 |
size="lg"
|
| 250 |
)
|
| 251 |
|
| 252 |
-
with gr.Accordion("
|
| 253 |
gr.Markdown("""
|
| 254 |
-
**
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
""")
|
| 265 |
|
| 266 |
gr.Markdown("---")
|
|
|
|
| 220 |
**Built for the MCP 1st Birthday Hackathon** π
|
| 221 |
""")
|
| 222 |
|
| 223 |
+
with gr.Accordion("βΉοΈ API URL Guidelines & Tips", open=False):
|
| 224 |
+
gr.Markdown("""
|
| 225 |
+
### β
What Works Best:
|
| 226 |
+
- **Base API URLs** (e.g., `https://api.example.com`)
|
| 227 |
+
- **REST APIs** with clear endpoints
|
| 228 |
+
- **OpenAPI/Swagger** documented APIs
|
| 229 |
+
- **Public APIs** (no complex auth)
|
| 230 |
+
|
| 231 |
+
### π― Try These Free APIs:
|
| 232 |
+
|
| 233 |
+
**No Auth Required (Perfect for Testing!):**
|
| 234 |
+
- `https://jsonplaceholder.typicode.com` - Fake REST API (best for testing!)
|
| 235 |
+
- `https://api.github.com` - GitHub public API
|
| 236 |
+
- `https://dog.ceo/api` - Random dog images
|
| 237 |
+
- `https://catfact.ninja` - Random cat facts
|
| 238 |
+
- `https://api.coindesk.com/v1/bpi` - Bitcoin prices
|
| 239 |
+
- `https://api.ipify.org` - Get IP address
|
| 240 |
+
|
| 241 |
+
**With API Key (Free Tier):**
|
| 242 |
+
- `https://api.openweathermap.org/data/2.5` - Weather data
|
| 243 |
+
- `https://newsapi.org/v2` - News articles
|
| 244 |
+
- `https://api.stripe.com` - Payment processing (test mode)
|
| 245 |
+
|
| 246 |
+
### π‘ Tips:
|
| 247 |
+
- **Start with jsonplaceholder.typicode.com** - always works!
|
| 248 |
+
- Paste the **base URL** (not a specific endpoint)
|
| 249 |
+
- If API needs a key, add it in the "API Key" field below
|
| 250 |
+
- Cached URLs generate instantly (try the same URL twice!)
|
| 251 |
+
|
| 252 |
+
### β οΈ May Not Work Well:
|
| 253 |
+
- GraphQL APIs (REST only for now)
|
| 254 |
+
- APIs requiring OAuth flows
|
| 255 |
+
- WebSocket-only APIs
|
| 256 |
+
- APIs with very complex authentication
|
| 257 |
+
""")
|
| 258 |
+
|
| 259 |
with gr.Row():
|
| 260 |
with gr.Column(scale=2):
|
| 261 |
gr.Markdown("### π Input")
|
|
|
|
| 285 |
size="lg"
|
| 286 |
)
|
| 287 |
|
| 288 |
+
with gr.Accordion("π Quick Start Examples", open=True):
|
| 289 |
gr.Markdown("""
|
| 290 |
+
**Click to copy and paste:**
|
| 291 |
+
|
| 292 |
+
```
|
| 293 |
+
https://jsonplaceholder.typicode.com
|
| 294 |
+
```
|
| 295 |
+
β **Recommended first try!** Always works, no API key needed.
|
| 296 |
+
|
| 297 |
+
---
|
| 298 |
+
|
| 299 |
+
**More examples:**
|
| 300 |
+
- `https://api.github.com` - GitHub API (no auth)
|
| 301 |
+
- `https://dog.ceo/api` - Dog images (fun!)
|
| 302 |
+
- `https://catfact.ninja` - Cat facts (simple)
|
| 303 |
+
|
| 304 |
+
π‘ **Tip:** MCPs are cached - try the same URL twice to see instant results!
|
| 305 |
""")
|
| 306 |
|
| 307 |
gr.Markdown("---")
|