Spaces:
Runtime error
Runtime error
Adnan commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -243,22 +243,37 @@ HEADER = """
|
|
| 243 |
"""
|
| 244 |
|
| 245 |
API_HELP = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
### 🔑 Where to Get API Keys
|
| 247 |
|
| 248 |
-
| Provider | Get Key |
|
| 249 |
|---|---|---|
|
| 250 |
-
|
|
| 251 |
-
|
|
| 252 |
-
|
|
| 253 |
-
|
|
| 254 |
-
|
|
| 255 |
-
|
|
| 256 |
-
|
|
| 257 |
-
| xAI Grok | [console.x.ai](https://console.x.ai
|
| 258 |
-
|
|
| 259 |
-
|
|
| 260 |
-
|
|
| 261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
|
| 263 |
|
| 264 |
with gr.Blocks(
|
|
|
|
| 243 |
"""
|
| 244 |
|
| 245 |
API_HELP = """
|
| 246 |
+
# ════════════════════════════════════════
|
| 247 |
+
# TAB 4: API KEYS HELP
|
| 248 |
+
# ════════════════════════════════════════
|
| 249 |
+
with gr.Tab("🔑 API Keys Guide"):
|
| 250 |
+
gr.Markdown("""
|
| 251 |
### 🔑 Where to Get API Keys
|
| 252 |
|
| 253 |
+
| Provider | Get Key | Needs Extra Package? |
|
| 254 |
|---|---|---|
|
| 255 |
+
| **Stability AI** | [platform.stability.ai](https://platform.stability.ai/account/keys) | ❌ No (uses requests) |
|
| 256 |
+
| **HuggingFace** | [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) | ❌ No (uses requests) |
|
| 257 |
+
| **Fireworks AI** | [fireworks.ai](https://fireworks.ai/account/api-keys) | ❌ No (uses requests) |
|
| 258 |
+
| **Ideogram** | [ideogram.ai](https://ideogram.ai/manage-api) | ❌ No (uses requests) |
|
| 259 |
+
| **Leonardo AI** | [leonardo.ai](https://app.leonardo.ai/api-access) | ❌ No (uses requests) |
|
| 260 |
+
| **Direct URL** | Any REST API | ❌ No (uses requests) |
|
| 261 |
+
| **OpenAI** | [platform.openai.com](https://platform.openai.com/api-keys) | ✅ `pip install openai` |
|
| 262 |
+
| **xAI Grok** | [console.x.ai](https://console.x.ai) | ✅ `pip install openai` |
|
| 263 |
+
| **Replicate** | [replicate.com](https://replicate.com/account/api-tokens) | ✅ `pip install replicate` |
|
| 264 |
+
| **Together AI** | [api.together.xyz](https://api.together.xyz/settings/api-keys) | ✅ `pip install together` |
|
| 265 |
+
| **Fal.ai** | [fal.ai/dashboard](https://fal.ai/dashboard/keys) | ✅ `pip install fal-client` |
|
| 266 |
+
| **Google Gemini** | [aistudio.google.com](https://aistudio.google.com/apikey) | ✅ `pip install google-generativeai` |
|
| 267 |
+
|
| 268 |
+
> **💡 Providers marked ❌ work out of the box!** No extra packages needed.
|
| 269 |
+
> Providers marked ✅ will show a friendly error if the package isn't installed.
|
| 270 |
+
|
| 271 |
+
### 🏆 Recommended (Zero Setup)
|
| 272 |
+
1. **Stability AI** — Best quality, supports img2img (consistency!)
|
| 273 |
+
2. **HuggingFace** — Free tier, many models
|
| 274 |
+
3. **Fireworks AI** — Fast Flux generation
|
| 275 |
+
4. **Ideogram** — Great text-in-image
|
| 276 |
+
""")
|
| 277 |
|
| 278 |
|
| 279 |
with gr.Blocks(
|