Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
|
|
| 1 |
from flask import Flask, render_template_string, request, jsonify
|
| 2 |
-
import
|
| 3 |
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
-
# โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 7 |
-
|
| 8 |
-
# Domains that commonly block iframes
|
| 9 |
-
BLOCKED_DOMAINS = [
|
| 10 |
-
"naver.com", "daum.net", "google.com",
|
| 11 |
-
"facebook.com", "instagram.com", "kakao.com",
|
| 12 |
-
"ycombinator.com"
|
| 13 |
-
]
|
| 14 |
-
|
| 15 |
-
# โโโโโโโโโโโโโโโโโโโโโโโโโโ 2. CURATED CATEGORIES โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 16 |
CATEGORIES = {
|
| 17 |
"Popular": [
|
| 18 |
"https://huggingface.co/spaces/fantos/Heatmap-Leaderboard-KOREA",
|
|
@@ -29,70 +22,15 @@ CATEGORIES = {
|
|
| 29 |
"https://huggingface.co/spaces/openfree/AGI-Screenplay-Pro",
|
| 30 |
"https://huggingface.co/spaces/ginipick/FLUXllama",
|
| 31 |
"https://huggingface.co/spaces/VIDraft/gpt-oss-RAG",
|
| 32 |
-
"https://openfree-AI-Calcurator.static.hf.space",
|
| 33 |
-
"https://huggingface.co/spaces/openfree/AGI-WebNovel-Gallery",
|
| 34 |
-
"https://huggingface.co/spaces/Heartsync/Wan-2.2-ADULT",
|
| 35 |
-
"https://huggingface.co/spaces/ginigen/Wan-2.2-Enhanced",
|
| 36 |
-
"https://huggingface.co/spaces/openfree/AGI-Screenplay",
|
| 37 |
-
"https://huggingface.co/spaces/openfree/AGI-WebNovel",
|
| 38 |
-
"https://huggingface.co/spaces/openfree/AGI-NOVEL",
|
| 39 |
-
"https://huggingface.co/spaces/fantaxy/AGI-LEADERBOARD",
|
| 40 |
-
"https://cutechicken-3d-airforce-simulator.static.hf.space",
|
| 41 |
-
"https://huggingface.co/spaces/Heartsync/FREE-NSFW-HUB",
|
| 42 |
-
"https://huggingface.co/spaces/ginipick/Private-AI",
|
| 43 |
-
"https://huggingface.co/spaces/fantaxy/ofai-flx-logo",
|
| 44 |
-
"https://huggingface.co/spaces/aiqtech/FLUX-Ghibli-Studio-LoRA",
|
| 45 |
-
"https://huggingface.co/spaces/seawolf2357/REALVISXL-V5",
|
| 46 |
-
"https://huggingface.co/spaces/fantos/flx8lora",
|
| 47 |
-
"https://huggingface.co/spaces/ginipick/Realtime-FLUX",
|
| 48 |
-
"https://huggingface.co/spaces/fantaxy/flx-pulid",
|
| 49 |
-
"https://huggingface.co/spaces/ginipick/FLUX-Prompt-Generator",
|
| 50 |
-
"https://huggingface.co/spaces/aiqtech/kofaceid",
|
| 51 |
-
"https://huggingface.co/spaces/aiqtech/flxgif",
|
| 52 |
-
"https://huggingface.co/spaces/fantos/flxfashmodel",
|
| 53 |
-
"https://huggingface.co/spaces/fantos/flxcontrol",
|
| 54 |
-
"https://huggingface.co/spaces/fantos/textcutobject",
|
| 55 |
-
"https://huggingface.co/spaces/seawolf2357/flxloraexp",
|
| 56 |
-
"https://huggingface.co/spaces/fantaxy/flxloraexp",
|
| 57 |
-
"https://huggingface.co/spaces/aiqtech/imaginpaint",
|
| 58 |
-
"https://huggingface.co/spaces/ginipick/FLUXllama",
|
| 59 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored",
|
| 60 |
-
"https://huggingface.co/spaces/fantaxy/flx-upscale",
|
| 61 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video",
|
| 62 |
-
"https://huggingface.co/spaces/fantos/VoiceClone",
|
| 63 |
-
"https://huggingface.co/spaces/fantaxy/Rolls-Royce",
|
| 64 |
-
"https://huggingface.co/spaces/aiqtech/FLUX-military",
|
| 65 |
-
"https://huggingface.co/spaces/fantaxy/FLUX-Animations",
|
| 66 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video2",
|
| 67 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-photo",
|
| 68 |
-
"https://huggingface.co/spaces/ginipick/Time-Stream",
|
| 69 |
-
"https://huggingface.co/spaces/seawolf2357/sd-prompt-gen",
|
| 70 |
-
"https://huggingface.co/spaces/openfree/MagicFace-V3",
|
| 71 |
-
"https://huggingface.co/spaces/Heartsync/adult",
|
| 72 |
-
"https://huggingface.co/spaces/Heartsync/wan2-1-fast-security",
|
| 73 |
-
"https://huggingface.co/spaces/seawolf2357/img2vid",
|
| 74 |
-
"https://huggingface.co/spaces/openfree/image-to-vector",
|
| 75 |
-
"https://huggingface.co/spaces/openfree/DreamO-video",
|
| 76 |
-
"https://huggingface.co/spaces/VIDraft/FramePack_rotate_landscape",
|
| 77 |
-
"https://huggingface.co/spaces/fantaxy/Sound-AI-SFX",
|
| 78 |
-
"https://huggingface.co/spaces/ginigen/VoiceClone-TTS",
|
| 79 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-image",
|
| 80 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-detection",
|
| 81 |
-
"https://huggingface.co/spaces/Heartsync/VEO3-RealTime",
|
| 82 |
"https://huggingface.co/spaces/ginigen/VEO3-Free",
|
| 83 |
-
"https://huggingface.co/spaces/ginigen/FLUX-Text-Tree-Image",
|
| 84 |
"https://huggingface.co/spaces/ginigen/text3d-r1",
|
| 85 |
"https://huggingface.co/spaces/VIDraft/stable-diffusion-3.5-large-turboX",
|
| 86 |
],
|
| 87 |
"BEST": [
|
| 88 |
-
"https://huggingface.co/spaces/Heartsync/Novel-NSFW",
|
| 89 |
"https://huggingface.co/spaces/ginipick/AGI-Personal",
|
| 90 |
"https://huggingface.co/spaces/ginigen/AI",
|
| 91 |
-
"https://openfree-WAR-Game-Simul.static.hf.space",
|
| 92 |
-
"https://ginigen-Hair-Pick.static.hf.space",
|
| 93 |
"https://huggingface.co/spaces/ginigen/AGI-WebToon-KOREA",
|
| 94 |
"https://huggingface.co/spaces/ginigen/webtoon-studio",
|
| 95 |
-
"https://vidraft-ai.static.hf.space",
|
| 96 |
"https://huggingface.co/spaces/MaziyarPanahi/FACTS-Leaderboard",
|
| 97 |
"https://huggingface.co/spaces/ginigen/Flux-Kontext-Style",
|
| 98 |
"https://huggingface.co/spaces/openfree/Cycle-Navigator",
|
|
@@ -100,261 +38,65 @@ CATEGORIES = {
|
|
| 100 |
"https://huggingface.co/spaces/ginigen/Seedance-Free",
|
| 101 |
"https://huggingface.co/spaces/VIDraft/SOMA-AGI",
|
| 102 |
"https://huggingface.co/spaces/aiqtech/Heatmap-Leaderboard",
|
| 103 |
-
"https://huggingface.co/spaces/Heartsync/PornHUB",
|
| 104 |
-
"https://huggingface.co/spaces/Heartsync/Hentai-Adult",
|
| 105 |
"https://huggingface.co/spaces/VIDraft/DNA-CASINO",
|
| 106 |
"https://huggingface.co/spaces/aiqtech/SOMA-Oriental",
|
| 107 |
-
"https://huggingface.co/spaces/fantaxy/YTB-TEST",
|
| 108 |
-
"https://huggingface.co/spaces/aiqtech/Contributors-Leaderboard",
|
| 109 |
-
"https://huggingface.co/spaces/ginigen/text3d-r1",
|
| 110 |
-
"https://huggingface.co/spaces/VIDraft/stable-diffusion-3.5-large-turboX",
|
| 111 |
-
"https://huggingface.co/spaces/openfree/Korean-Leaderboard",
|
| 112 |
-
"https://huggingface.co/spaces/fantos/flxcontrol",
|
| 113 |
-
"https://huggingface.co/spaces/aiqtech/FLUX-Ghibli-Studio-LoRA",
|
| 114 |
-
"https://huggingface.co/spaces/openfree/AI-Podcast",
|
| 115 |
-
"https://huggingface.co/spaces/ginigen/Workflow-Canvas",
|
| 116 |
-
"https://huggingface.co/spaces/ginigen/3D-LLAMA",
|
| 117 |
-
"https://huggingface.co/spaces/ginigen/VoiceClone-TTS",
|
| 118 |
-
"https://huggingface.co/spaces/VIDraft/ACE-Singer",
|
| 119 |
-
"https://huggingface.co/spaces/ginipick/AI-BOOK",
|
| 120 |
-
"https://huggingface.co/spaces/immunobiotech/drug-discovery",
|
| 121 |
-
"https://huggingface.co/spaces/VIDraft/Robo-Beam",
|
| 122 |
-
"https://huggingface.co/spaces/fantaxy/fantasy-novel",
|
| 123 |
-
"https://huggingface.co/spaces/immunobiotech/Gemini-MICHELIN",
|
| 124 |
-
"https://huggingface.co/spaces/openfree/Chart-GPT",
|
| 125 |
-
"https://huggingface.co/spaces/ginipick/NH-Korea",
|
| 126 |
-
"https://huggingface.co/spaces/VIDraft/Voice-Clone-Podcast",
|
| 127 |
-
"https://huggingface.co/spaces/ginipick/Private-AI",
|
| 128 |
-
"https://huggingface.co/spaces/ginigen/Flux-VIDEO",
|
| 129 |
-
"https://huggingface.co/spaces/openfree/open-GAMMA",
|
| 130 |
-
"https://huggingface.co/spaces/ginipick/PharmAI-Korea",
|
| 131 |
-
"https://huggingface.co/spaces/ginipick/Pharmacy",
|
| 132 |
-
"https://huggingface.co/spaces/ginipick/PDF-EXAM",
|
| 133 |
-
"https://huggingface.co/spaces/ginipick/IDEA-DESIGN",
|
| 134 |
-
"https://huggingface.co/spaces/openfree/DreamO-video",
|
| 135 |
-
"https://huggingface.co/spaces/ginipick/10m-marketing",
|
| 136 |
-
"https://huggingface.co/spaces/VIDraft/voice-trans",
|
| 137 |
-
"https://huggingface.co/spaces/VIDraft/NH-Prediction",
|
| 138 |
-
"https://huggingface.co/spaces/fantos/flx8lora",
|
| 139 |
-
"https://huggingface.co/spaces/ginigen/MagicFace-V3",
|
| 140 |
-
"https://huggingface.co/spaces/openfree/Live-Podcast",
|
| 141 |
-
"https://huggingface.co/spaces/seawolf2357/ocrlatex",
|
| 142 |
-
"https://huggingface.co/spaces/Heartsync/VEO3-RealTime",
|
| 143 |
-
"https://huggingface.co/spaces/ginigen/VEO3-Free",
|
| 144 |
-
"https://huggingface.co/spaces/openfree/MagicFace-V3",
|
| 145 |
-
"https://huggingface.co/spaces/aiqtech/FLUX-military",
|
| 146 |
-
"https://huggingface.co/spaces/fantaxy/flxloraexp",
|
| 147 |
-
"https://huggingface.co/spaces/Heartsync/WAN2-1-fast-T2V-FusioniX",
|
| 148 |
-
"https://huggingface.co/spaces/ginigen/FLUXllama-Multilingual",
|
| 149 |
-
"https://huggingface.co/spaces/Heartsync/wan2-1-fast-security",
|
| 150 |
-
"https://huggingface.co/spaces/fantaxy/Rolls-Royce",
|
| 151 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-REAL",
|
| 152 |
-
"https://huggingface.co/spaces/ginipick/Realtime-FLUX",
|
| 153 |
-
"https://huggingface.co/spaces/aiqtech/imaginpaint",
|
| 154 |
-
"https://huggingface.co/spaces/aiqtech/flxgif",
|
| 155 |
-
"https://huggingface.co/spaces/fantos/flxfashmodel",
|
| 156 |
-
"https://huggingface.co/spaces/aiqtech/kofaceid",
|
| 157 |
-
"https://huggingface.co/spaces/ginipick/FLUX-Prompt-Generator",
|
| 158 |
-
"https://huggingface.co/spaces/seawolf2357/REALVISXL-V5",
|
| 159 |
-
"https://huggingface.co/spaces/fantaxy/FLUX-Animations",
|
| 160 |
-
"https://huggingface.co/spaces/fantaxy/flx-pulid",
|
| 161 |
-
"https://huggingface.co/spaces/fantaxy/ofai-flx-logo",
|
| 162 |
-
"https://huggingface.co/spaces/openfree/image-to-vector",
|
| 163 |
-
"https://huggingface.co/spaces/Heartsync/FREE-NSFW-HUB",
|
| 164 |
-
"https://huggingface.co/spaces/seawolf2357/sd-prompt-gen",
|
| 165 |
-
"https://huggingface.co/spaces/VIDraft/FramePack_rotate_landscape",
|
| 166 |
-
"https://huggingface.co/spaces/ginipick/FLUXllama",
|
| 167 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-image",
|
| 168 |
-
"https://huggingface.co/spaces/seawolf2357/img2vid",
|
| 169 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video2",
|
| 170 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-detection",
|
| 171 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video",
|
| 172 |
-
"https://huggingface.co/spaces/Heartsync/adult",
|
| 173 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored",
|
| 174 |
-
"https://huggingface.co/spaces/fantos/VoiceClone",
|
| 175 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-photo",
|
| 176 |
-
"https://huggingface.co/spaces/fantaxy/flx-upscale",
|
| 177 |
-
"https://huggingface.co/spaces/seawolf2357/flxloraexp",
|
| 178 |
-
"https://huggingface.co/spaces/ginipick/Time-Stream",
|
| 179 |
-
"https://huggingface.co/spaces/fantos/textcutobject",
|
| 180 |
],
|
| 181 |
"NEW": [
|
| 182 |
"https://huggingface.co/spaces/ginigen/Family",
|
| 183 |
"https://huggingface.co/spaces/ginigen/AGI-Screenplay",
|
| 184 |
"https://huggingface.co/spaces/openfree/OpenAI-gpt-oss",
|
| 185 |
-
"https://huggingface.co/spaces/ginigen/Flux-Kontext-Style",
|
| 186 |
-
"https://cutechicken-3d-airforce-simulator.static.hf.space",
|
| 187 |
"https://huggingface.co/spaces/ginipick/Private-AI",
|
| 188 |
"https://huggingface.co/spaces/VIDraft/ACE-Singer",
|
| 189 |
"https://huggingface.co/spaces/ginipick/AI-BOOK",
|
| 190 |
"https://huggingface.co/spaces/openfree/Best-AI",
|
| 191 |
-
"https://huggingface.co/spaces/aiqtech/Heatmap-Leaderboard",
|
| 192 |
-
"https://huggingface.co/spaces/VIDraft/DNA-CASINO",
|
| 193 |
-
"https://huggingface.co/spaces/openfree/AGI-Screenplay",
|
| 194 |
-
"https://huggingface.co/spaces/openfree/AGI-WebNovel",
|
| 195 |
-
"https://huggingface.co/spaces/openfree/AGI-NOVEL",
|
| 196 |
-
"https://huggingface.co/spaces/fantaxy/AGI-LEADERBOARD",
|
| 197 |
-
"https://huggingface.co/spaces/ginigen/Seedance-Free",
|
| 198 |
-
"https://huggingface.co/spaces/aiqtech/SOMA-Oriental",
|
| 199 |
-
"https://huggingface.co/spaces/ginigen/Flux-Kontext-FaceLORA",
|
| 200 |
-
"https://huggingface.co/spaces/VIDraft/SOMA-AGI",
|
| 201 |
"https://huggingface.co/spaces/Heartsync/VEO3-RealTime",
|
| 202 |
"https://huggingface.co/spaces/openfree/Open-GAMMA",
|
| 203 |
-
"https://huggingface.co/spaces/ginigen/VEO3-Free",
|
| 204 |
-
"https://huggingface.co/spaces/Heartsync/WAN2-1-fast-T2V-FusioniX",
|
| 205 |
-
"https://huggingface.co/spaces/VIDraft/voice-trans",
|
| 206 |
-
"https://huggingface.co/spaces/VIDraft/Robo-Beam",
|
| 207 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-REAL",
|
| 208 |
-
"https://huggingface.co/spaces/fantaxy/fantasy-novel",
|
| 209 |
-
"https://huggingface.co/spaces/openfree/Chart-GPT",
|
| 210 |
-
"https://huggingface.co/spaces/Heartsync/Novel-NSFW",
|
| 211 |
-
"https://huggingface.co/spaces/ginigen/FLUX-Ghibli-LoRA2",
|
| 212 |
-
"https://huggingface.co/spaces/Heartsync/WAN-VIDEO-AUDIO",
|
| 213 |
-
"https://huggingface.co/spaces/Heartsync/wan2-1-fast-security",
|
| 214 |
-
"https://huggingface.co/spaces/ginigen/Flux-VIDEO",
|
| 215 |
-
"https://huggingface.co/spaces/aiqcamp/REMOVAL-TEXT-IMAGE",
|
| 216 |
-
"https://huggingface.co/spaces/VIDraft/Mistral-RAG-BitSix",
|
| 217 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video2",
|
| 218 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video",
|
| 219 |
-
"https://huggingface.co/spaces/fantaxy/YTB-TEST",
|
| 220 |
-
"https://huggingface.co/spaces/Heartsync/FREE-NSFW-HUB",
|
| 221 |
-
"https://huggingface.co/spaces/Heartsync/adult",
|
| 222 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-photo",
|
| 223 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored",
|
| 224 |
-
"https://huggingface.co/spaces/openfree/Live-Podcast",
|
| 225 |
-
"https://huggingface.co/spaces/openfree/AI-Podcast",
|
| 226 |
-
"https://huggingface.co/spaces/ginipick/NH-Korea",
|
| 227 |
-
"https://huggingface.co/spaces/VIDraft/NH-Prediction",
|
| 228 |
-
"https://huggingface.co/spaces/VIDraft/Voice-Clone-Podcast",
|
| 229 |
-
"https://huggingface.co/spaces/ginipick/PDF-EXAM",
|
| 230 |
-
"https://huggingface.co/spaces/openfree/Game-Gallery",
|
| 231 |
-
"https://huggingface.co/spaces/openfree/Vibe-Game",
|
| 232 |
-
"https://huggingface.co/spaces/ginipick/IDEA-DESIGN",
|
| 233 |
-
"https://huggingface.co/spaces/openfree/Cycle-Navigator",
|
| 234 |
-
"https://huggingface.co/spaces/openfree/DreamO-video",
|
| 235 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-detection",
|
| 236 |
],
|
| 237 |
"Productivity": [
|
| 238 |
"https://huggingface.co/spaces/ginigen/Markets",
|
| 239 |
-
"https://huggingface.co/spaces/aiqtech/Heatmap-Leaderboard",
|
| 240 |
-
"https://huggingface.co/spaces/VIDraft/DNA-CASINO",
|
| 241 |
-
"https://huggingface.co/spaces/openfree/Open-GAMMA",
|
| 242 |
"https://huggingface.co/spaces/VIDraft/Robo-Beam",
|
| 243 |
"https://huggingface.co/spaces/VIDraft/voice-trans",
|
| 244 |
-
"https://huggingface.co/spaces/Heartsync/FREE-NSFW-HUB",
|
| 245 |
"https://huggingface.co/spaces/openfree/Chart-GPT",
|
| 246 |
-
"https://huggingface.co/spaces/ginipick/AI-BOOK",
|
| 247 |
"https://huggingface.co/spaces/VIDraft/Voice-Clone-Podcast",
|
| 248 |
"https://huggingface.co/spaces/ginipick/PDF-EXAM",
|
| 249 |
-
"https://huggingface.co/spaces/ginigen/perflexity-clone",
|
| 250 |
-
"https://huggingface.co/spaces/ginipick/IDEA-DESIGN",
|
| 251 |
-
"https://huggingface.co/spaces/ginipick/10m-marketing",
|
| 252 |
-
"https://huggingface.co/spaces/openfree/Live-Podcast",
|
| 253 |
-
"https://huggingface.co/spaces/openfree/AI-Podcast",
|
| 254 |
-
"https://huggingface.co/spaces/ginipick/QR-Canvas-plus",
|
| 255 |
-
"https://huggingface.co/spaces/openfree/Badge",
|
| 256 |
-
"https://huggingface.co/spaces/VIDraft/mouse-webgen",
|
| 257 |
-
"https://huggingface.co/spaces/openfree/Vibe-Game",
|
| 258 |
-
"https://huggingface.co/spaces/VIDraft/NH-Prediction",
|
| 259 |
-
"https://huggingface.co/spaces/ginipick/NH-Korea",
|
| 260 |
-
"https://huggingface.co/spaces/openfree/Naming",
|
| 261 |
-
"https://huggingface.co/spaces/ginipick/Change-Hair",
|
| 262 |
],
|
| 263 |
"Multimodal": [
|
| 264 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-photo",
|
| 265 |
-
"https://huggingface.co/spaces/fantaxy/YTB-TEST",
|
| 266 |
"https://huggingface.co/spaces/ginigen/Seedance-Free",
|
| 267 |
"https://huggingface.co/spaces/Heartsync/VEO3-RealTime",
|
| 268 |
"https://huggingface.co/spaces/ginigen/VEO3-Free",
|
| 269 |
-
"https://huggingface.co/spaces/ginigen/VEO3-Directors",
|
| 270 |
-
"https://huggingface.co/spaces/Heartsync/WAN2-1-fast-T2V-FusioniX",
|
| 271 |
-
"https://huggingface.co/spaces/Heartsync/adult",
|
| 272 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored",
|
| 273 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video2",
|
| 274 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-video",
|
| 275 |
-
"https://huggingface.co/spaces/Heartsync/WAN-VIDEO-AUDIO",
|
| 276 |
-
"https://huggingface.co/spaces/Heartsync/wan2-1-fast-security",
|
| 277 |
"https://huggingface.co/spaces/ginigen/Flux-VIDEO",
|
| 278 |
-
"https://huggingface.co/spaces/ginigen/3D-LLAMA-V1",
|
| 279 |
-
"https://huggingface.co/spaces/ginigen/Flux-VIDEO",
|
| 280 |
-
"https://huggingface.co/spaces/openfree/Multilingual-TTS",
|
| 281 |
"https://huggingface.co/spaces/VIDraft/ACE-Singer",
|
| 282 |
"https://huggingface.co/spaces/openfree/DreamO-video",
|
| 283 |
-
"https://huggingface.co/spaces/fantaxy/Sound-AI-SFX",
|
| 284 |
-
"https://huggingface.co/spaces/ginigen/SFX-Sound-magic",
|
| 285 |
"https://huggingface.co/spaces/ginigen/VoiceClone-TTS",
|
| 286 |
-
"https://huggingface.co/spaces/aiqcamp/ENGLISH-Speaking-Scoring",
|
| 287 |
-
"https://huggingface.co/spaces/fantaxy/Remove-Video-Background",
|
| 288 |
],
|
| 289 |
"Professional": [
|
| 290 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-novels",
|
| 291 |
"https://huggingface.co/spaces/aiqtech/SOMA-Oriental",
|
| 292 |
"https://huggingface.co/spaces/VIDraft/SOMA-AGI",
|
| 293 |
-
"https://huggingface.co/spaces/Heartsync/Novel-NSFW",
|
| 294 |
-
"https://huggingface.co/spaces/fantaxy/fantasy-novel",
|
| 295 |
"https://huggingface.co/spaces/VIDraft/money-radar",
|
| 296 |
"https://huggingface.co/spaces/immunobiotech/drug-discovery",
|
| 297 |
-
"https://huggingface.co/spaces/immunobiotech/Gemini-MICHELIN",
|
| 298 |
"https://huggingface.co/spaces/openfree/Cycle-Navigator",
|
| 299 |
"https://huggingface.co/spaces/VIDraft/Fashion-Fit",
|
| 300 |
-
"https://huggingface.co/spaces/openfree/Stock-Trading-Analysis",
|
| 301 |
-
"https://huggingface.co/spaces/ginipick/AgentX-Papers",
|
| 302 |
-
"https://huggingface.co/spaces/Heartsync/Papers-Leaderboard",
|
| 303 |
-
"https://huggingface.co/spaces/VIDraft/PapersImpact",
|
| 304 |
-
"https://huggingface.co/spaces/ginigen/multimodal-chat-mbti-korea",
|
| 305 |
],
|
| 306 |
"Image": [
|
| 307 |
"https://huggingface.co/spaces/openfree/Face-blurring",
|
| 308 |
"https://huggingface.co/spaces/ginigen/Flux-Kontext-FaceLORA",
|
| 309 |
-
"https://huggingface.co/spaces/Heartsync/NSFW-Uncensored-REAL",
|
| 310 |
-
"https://huggingface.co/spaces/ginigen/FLUX-Ghibli-LoRA2",
|
| 311 |
-
"https://huggingface.co/spaces/aiqcamp/REMOVAL-TEXT-IMAGE",
|
| 312 |
-
"https://huggingface.co/spaces/VIDraft/BAGEL-Websearch",
|
| 313 |
-
"https://huggingface.co/spaces/ginigen/Every-Text",
|
| 314 |
"https://huggingface.co/spaces/ginigen/text3d-r1",
|
| 315 |
"https://huggingface.co/spaces/ginipick/FLUXllama",
|
| 316 |
"https://huggingface.co/spaces/ginigen/Workflow-Canvas",
|
| 317 |
-
"https://huggingface.co/spaces/ginigen/canvas-studio",
|
| 318 |
-
"https://huggingface.co/spaces/VIDraft/ReSize-Image-Outpainting",
|
| 319 |
-
"https://huggingface.co/spaces/Heartsync/FLUX-Vision",
|
| 320 |
-
"https://huggingface.co/spaces/fantos/textcutobject",
|
| 321 |
-
"https://huggingface.co/spaces/aiqtech/imaginpaint",
|
| 322 |
-
"https://huggingface.co/spaces/openfree/ColorRevive",
|
| 323 |
-
"https://huggingface.co/spaces/openfree/ultpixgen",
|
| 324 |
-
"https://huggingface.co/spaces/VIDraft/Polaroid-Style",
|
| 325 |
-
"https://huggingface.co/spaces/ginigen/VisualCloze",
|
| 326 |
-
"https://huggingface.co/spaces/fantaxy/ofai-flx-logo",
|
| 327 |
-
"https://huggingface.co/spaces/ginigen/interior-design",
|
| 328 |
"https://huggingface.co/spaces/ginigen/MagicFace-V3",
|
| 329 |
-
"https://huggingface.co/spaces/fantaxy/flx-pulid",
|
| 330 |
-
"https://huggingface.co/spaces/seawolf2357/Ghibli-Multilingual-Text-rendering",
|
| 331 |
-
"https://huggingface.co/spaces/VIDraft/Open-Meme-Studio",
|
| 332 |
"https://huggingface.co/spaces/VIDraft/stable-diffusion-3.5-large-turboX",
|
| 333 |
-
"https://huggingface.co/spaces/aiqtech/flxgif",
|
| 334 |
-
"https://huggingface.co/spaces/openfree/VectorFlow",
|
| 335 |
"https://huggingface.co/spaces/ginigen/3D-LLAMA",
|
| 336 |
-
"https://huggingface.co/spaces/ginigen/Multi-LoRAgen",
|
| 337 |
],
|
| 338 |
"LLM / VLM": [
|
| 339 |
-
"https://huggingface.co/spaces/fantaxy/fantasy-novel",
|
| 340 |
"https://huggingface.co/spaces/ginigen/deepseek-r1-0528-API",
|
| 341 |
"https://huggingface.co/spaces/aiqcamp/Mistral-Devstral-API",
|
| 342 |
"https://huggingface.co/spaces/aiqcamp/deepseek-r1-0528",
|
| 343 |
-
"https://huggingface.co/spaces/aiqcamp/deepseek-r1-0528-qwen3-8b",
|
| 344 |
-
"https://huggingface.co/spaces/aiqcamp/deepseek-r1-0528",
|
| 345 |
-
"https://huggingface.co/spaces/aiqcamp/Mistral-Devstral-API",
|
| 346 |
"https://huggingface.co/spaces/VIDraft/Mistral-RAG-BitSix",
|
| 347 |
-
"https://huggingface.co/spaces/VIDraft/Gemma-3-R1984-4B",
|
| 348 |
-
"https://huggingface.co/spaces/VIDraft/Gemma-3-R1984-12B",
|
| 349 |
"https://huggingface.co/spaces/ginigen/Mistral-Perflexity",
|
| 350 |
-
"https://huggingface.co/spaces/aiqcamp/gemini-2.5-flash-preview",
|
| 351 |
-
"https://huggingface.co/spaces/openfree/qwen3-30b-a3b-research",
|
| 352 |
-
"https://huggingface.co/spaces/openfree/qwen3-235b-a22b-research",
|
| 353 |
-
"https://huggingface.co/spaces/openfree/Llama-4-Maverick-17B-Research",
|
| 354 |
],
|
| 355 |
}
|
| 356 |
|
| 357 |
-
# โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 358 |
def direct_url(hf_url):
|
| 359 |
m = re.match(r"https?://huggingface\.co/spaces/([^/]+)/([^/?#]+)", hf_url)
|
| 360 |
if not m:
|
|
@@ -367,13 +109,12 @@ def direct_url(hf_url):
|
|
| 367 |
def screenshot_url(url):
|
| 368 |
return f"https://image.thum.io/get/fullpage/{url}"
|
| 369 |
|
| 370 |
-
# โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 371 |
-
@
|
| 372 |
def api_category():
|
| 373 |
cat = request.args.get('name', '')
|
| 374 |
urls = CATEGORIES.get(cat, [])
|
| 375 |
|
| 376 |
-
# Add pagination for categories
|
| 377 |
page = int(request.args.get('page', 1))
|
| 378 |
per_page = int(request.args.get('per_page', 4))
|
| 379 |
|
|
@@ -399,7 +140,6 @@ def api_category():
|
|
| 399 |
"total_pages": total_pages
|
| 400 |
})
|
| 401 |
|
| 402 |
-
# โโโโโโโโโโโโโโโโโโโโโโโโโโ 5. MAIN ROUTES โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 403 |
HTML_TEMPLATE = r'''<!DOCTYPE html>
|
| 404 |
<html>
|
| 405 |
<head>
|
|
@@ -423,10 +163,8 @@ body{margin:0;font-family:Nunito,sans-serif;background:#f6f8fb;}
|
|
| 423 |
.card{background:#fff;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.08);overflow:hidden;height:540px;display:flex;flex-direction:column;position:relative;}
|
| 424 |
.frame{flex:1;position:relative;overflow:hidden;}
|
| 425 |
.frame iframe{position:absolute;width:166.667%;height:166.667%;transform:scale(.6);transform-origin:top left;border:0;}
|
| 426 |
-
.frame img{width:100%;height:100%;object-fit:cover;}
|
| 427 |
.card-label{position:absolute;top:10px;left:10px;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:bold;z-index:100;text-transform:uppercase;letter-spacing:0.5px;box-shadow:0 2px 4px rgba(0,0,0,0.2);}
|
| 428 |
.label-live{background:linear-gradient(135deg, #00c6ff, #0072ff);color:white;}
|
| 429 |
-
.label-static{background:linear-gradient(135deg, #ff9a9e, #fad0c4);color:#333;}
|
| 430 |
.foot{height:44px;background:#fafafa;display:flex;align-items:center;justify-content:center;border-top:1px solid #eee;}
|
| 431 |
.foot a{font-size:.82rem;font-weight:700;color:#4a6dd8;text-decoration:none;}
|
| 432 |
.pagination{display:flex;justify-content:center;margin:20px 0;gap:10px;}
|
|
@@ -440,7 +178,6 @@ body{margin:0;font-family:Nunito,sans-serif;background:#f6f8fb;}
|
|
| 440 |
<p>
|
| 441 |
<a href="https://huggingface.co/OpenFreeAI" target="_blank"><img src="https://img.shields.io/static/v1?label=Community&message=OpenFree_AI&color=%23800080&labelColor=%23000080&logo=HUGGINGFACE&logoColor=%23ffa500&style=for-the-badge" alt="badge"></a>
|
| 442 |
<a href="https://discord.gg/openfreeai" target="_blank"><img src="https://img.shields.io/static/v1?label=Discord&message=Openfree%20AI&color=%230000ff&labelColor=%23800080&logo=discord&logoColor=white&style=for-the-badge" alt="badge"></a>
|
| 443 |
-
<a href="https://huggingface.co/spaces/openfree/Best-AI" target="_blank"><img src="https://img.shields.io/static/v1?label=OpenFree&message=BEST%20AI%20Services&color=%230000ff&labelColor=%23000080&logo=huggingface&logoColor=%23ffa500&style=for-the-badge" alt="badge"></a>
|
| 444 |
</p>
|
| 445 |
</header>
|
| 446 |
<div class="tabs" id="tabs"></div>
|
|
@@ -451,19 +188,8 @@ const tabs = document.getElementById('tabs');
|
|
| 451 |
const content = document.getElementById('content');
|
| 452 |
let active = "";
|
| 453 |
let currentPage = 1;
|
| 454 |
-
function makeRequest(url,
|
| 455 |
-
|
| 456 |
-
xhr.open(method, url, true);
|
| 457 |
-
xhr.onreadystatechange = function() {
|
| 458 |
-
if (xhr.readyState === 4 && xhr.status === 200) {
|
| 459 |
-
callback(JSON.parse(xhr.responseText));
|
| 460 |
-
}
|
| 461 |
-
};
|
| 462 |
-
if (method === 'POST') {
|
| 463 |
-
xhr.send(data);
|
| 464 |
-
} else {
|
| 465 |
-
xhr.send();
|
| 466 |
-
}
|
| 467 |
}
|
| 468 |
function updateTabs() {
|
| 469 |
Array.from(tabs.children).forEach(b => {
|
|
@@ -478,11 +204,11 @@ function loadCategory(cat, page) {
|
|
| 478 |
|
| 479 |
content.innerHTML = '<p style="text-align:center;padding:40px">Loadingโฆ</p>';
|
| 480 |
|
| 481 |
-
makeRequest('/api/category?name=' + encodeURIComponent(cat) + '&page=' + currentPage + '&per_page=4',
|
| 482 |
let html = '<div class="grid">';
|
| 483 |
|
| 484 |
if(data.items.length === 0) {
|
| 485 |
-
html += '<p style="grid-column:1/-1;text-align:center;padding:40px">No items
|
| 486 |
} else {
|
| 487 |
data.items.forEach(item => {
|
| 488 |
html += `
|
|
@@ -500,7 +226,6 @@ function loadCategory(cat, page) {
|
|
| 500 |
}
|
| 501 |
|
| 502 |
html += '</div>';
|
| 503 |
-
|
| 504 |
html += `
|
| 505 |
<div class="pagination">
|
| 506 |
<button ${currentPage <= 1 ? 'disabled' : ''} onclick="loadCategory('${cat}', ${currentPage-1})">ยซ Previous</button>
|
|
@@ -535,9 +260,12 @@ loadCategory('Popular', 1);
|
|
| 535 |
</body>
|
| 536 |
</html>'''
|
| 537 |
|
| 538 |
-
@
|
| 539 |
def home():
|
| 540 |
return render_template_string(HTML_TEMPLATE, cats=list(CATEGORIES.keys()))
|
| 541 |
|
|
|
|
|
|
|
|
|
|
| 542 |
if __name__ == '__main__':
|
| 543 |
-
app.
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
from flask import Flask, render_template_string, request, jsonify
|
| 3 |
+
import re
|
| 4 |
|
| 5 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโ FLASK APP โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 6 |
+
flask_app = Flask(__name__)
|
| 7 |
|
| 8 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโ CURATED CATEGORIES โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
CATEGORIES = {
|
| 10 |
"Popular": [
|
| 11 |
"https://huggingface.co/spaces/fantos/Heatmap-Leaderboard-KOREA",
|
|
|
|
| 22 |
"https://huggingface.co/spaces/openfree/AGI-Screenplay-Pro",
|
| 23 |
"https://huggingface.co/spaces/ginipick/FLUXllama",
|
| 24 |
"https://huggingface.co/spaces/VIDraft/gpt-oss-RAG",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
"https://huggingface.co/spaces/ginigen/VEO3-Free",
|
|
|
|
| 26 |
"https://huggingface.co/spaces/ginigen/text3d-r1",
|
| 27 |
"https://huggingface.co/spaces/VIDraft/stable-diffusion-3.5-large-turboX",
|
| 28 |
],
|
| 29 |
"BEST": [
|
|
|
|
| 30 |
"https://huggingface.co/spaces/ginipick/AGI-Personal",
|
| 31 |
"https://huggingface.co/spaces/ginigen/AI",
|
|
|
|
|
|
|
| 32 |
"https://huggingface.co/spaces/ginigen/AGI-WebToon-KOREA",
|
| 33 |
"https://huggingface.co/spaces/ginigen/webtoon-studio",
|
|
|
|
| 34 |
"https://huggingface.co/spaces/MaziyarPanahi/FACTS-Leaderboard",
|
| 35 |
"https://huggingface.co/spaces/ginigen/Flux-Kontext-Style",
|
| 36 |
"https://huggingface.co/spaces/openfree/Cycle-Navigator",
|
|
|
|
| 38 |
"https://huggingface.co/spaces/ginigen/Seedance-Free",
|
| 39 |
"https://huggingface.co/spaces/VIDraft/SOMA-AGI",
|
| 40 |
"https://huggingface.co/spaces/aiqtech/Heatmap-Leaderboard",
|
|
|
|
|
|
|
| 41 |
"https://huggingface.co/spaces/VIDraft/DNA-CASINO",
|
| 42 |
"https://huggingface.co/spaces/aiqtech/SOMA-Oriental",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
],
|
| 44 |
"NEW": [
|
| 45 |
"https://huggingface.co/spaces/ginigen/Family",
|
| 46 |
"https://huggingface.co/spaces/ginigen/AGI-Screenplay",
|
| 47 |
"https://huggingface.co/spaces/openfree/OpenAI-gpt-oss",
|
|
|
|
|
|
|
| 48 |
"https://huggingface.co/spaces/ginipick/Private-AI",
|
| 49 |
"https://huggingface.co/spaces/VIDraft/ACE-Singer",
|
| 50 |
"https://huggingface.co/spaces/ginipick/AI-BOOK",
|
| 51 |
"https://huggingface.co/spaces/openfree/Best-AI",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
"https://huggingface.co/spaces/Heartsync/VEO3-RealTime",
|
| 53 |
"https://huggingface.co/spaces/openfree/Open-GAMMA",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
],
|
| 55 |
"Productivity": [
|
| 56 |
"https://huggingface.co/spaces/ginigen/Markets",
|
|
|
|
|
|
|
|
|
|
| 57 |
"https://huggingface.co/spaces/VIDraft/Robo-Beam",
|
| 58 |
"https://huggingface.co/spaces/VIDraft/voice-trans",
|
|
|
|
| 59 |
"https://huggingface.co/spaces/openfree/Chart-GPT",
|
|
|
|
| 60 |
"https://huggingface.co/spaces/VIDraft/Voice-Clone-Podcast",
|
| 61 |
"https://huggingface.co/spaces/ginipick/PDF-EXAM",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
],
|
| 63 |
"Multimodal": [
|
|
|
|
|
|
|
| 64 |
"https://huggingface.co/spaces/ginigen/Seedance-Free",
|
| 65 |
"https://huggingface.co/spaces/Heartsync/VEO3-RealTime",
|
| 66 |
"https://huggingface.co/spaces/ginigen/VEO3-Free",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
"https://huggingface.co/spaces/ginigen/Flux-VIDEO",
|
|
|
|
|
|
|
|
|
|
| 68 |
"https://huggingface.co/spaces/VIDraft/ACE-Singer",
|
| 69 |
"https://huggingface.co/spaces/openfree/DreamO-video",
|
|
|
|
|
|
|
| 70 |
"https://huggingface.co/spaces/ginigen/VoiceClone-TTS",
|
|
|
|
|
|
|
| 71 |
],
|
| 72 |
"Professional": [
|
|
|
|
| 73 |
"https://huggingface.co/spaces/aiqtech/SOMA-Oriental",
|
| 74 |
"https://huggingface.co/spaces/VIDraft/SOMA-AGI",
|
|
|
|
|
|
|
| 75 |
"https://huggingface.co/spaces/VIDraft/money-radar",
|
| 76 |
"https://huggingface.co/spaces/immunobiotech/drug-discovery",
|
|
|
|
| 77 |
"https://huggingface.co/spaces/openfree/Cycle-Navigator",
|
| 78 |
"https://huggingface.co/spaces/VIDraft/Fashion-Fit",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
],
|
| 80 |
"Image": [
|
| 81 |
"https://huggingface.co/spaces/openfree/Face-blurring",
|
| 82 |
"https://huggingface.co/spaces/ginigen/Flux-Kontext-FaceLORA",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
"https://huggingface.co/spaces/ginigen/text3d-r1",
|
| 84 |
"https://huggingface.co/spaces/ginipick/FLUXllama",
|
| 85 |
"https://huggingface.co/spaces/ginigen/Workflow-Canvas",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
"https://huggingface.co/spaces/ginigen/MagicFace-V3",
|
|
|
|
|
|
|
|
|
|
| 87 |
"https://huggingface.co/spaces/VIDraft/stable-diffusion-3.5-large-turboX",
|
|
|
|
|
|
|
| 88 |
"https://huggingface.co/spaces/ginigen/3D-LLAMA",
|
|
|
|
| 89 |
],
|
| 90 |
"LLM / VLM": [
|
|
|
|
| 91 |
"https://huggingface.co/spaces/ginigen/deepseek-r1-0528-API",
|
| 92 |
"https://huggingface.co/spaces/aiqcamp/Mistral-Devstral-API",
|
| 93 |
"https://huggingface.co/spaces/aiqcamp/deepseek-r1-0528",
|
|
|
|
|
|
|
|
|
|
| 94 |
"https://huggingface.co/spaces/VIDraft/Mistral-RAG-BitSix",
|
|
|
|
|
|
|
| 95 |
"https://huggingface.co/spaces/ginigen/Mistral-Perflexity",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
],
|
| 97 |
}
|
| 98 |
|
| 99 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโ URL HELPERS โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 100 |
def direct_url(hf_url):
|
| 101 |
m = re.match(r"https?://huggingface\.co/spaces/([^/]+)/([^/?#]+)", hf_url)
|
| 102 |
if not m:
|
|
|
|
| 109 |
def screenshot_url(url):
|
| 110 |
return f"https://image.thum.io/get/fullpage/{url}"
|
| 111 |
|
| 112 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโ FLASK ROUTES โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 113 |
+
@flask_app.route('/api/category')
|
| 114 |
def api_category():
|
| 115 |
cat = request.args.get('name', '')
|
| 116 |
urls = CATEGORIES.get(cat, [])
|
| 117 |
|
|
|
|
| 118 |
page = int(request.args.get('page', 1))
|
| 119 |
per_page = int(request.args.get('per_page', 4))
|
| 120 |
|
|
|
|
| 140 |
"total_pages": total_pages
|
| 141 |
})
|
| 142 |
|
|
|
|
| 143 |
HTML_TEMPLATE = r'''<!DOCTYPE html>
|
| 144 |
<html>
|
| 145 |
<head>
|
|
|
|
| 163 |
.card{background:#fff;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.08);overflow:hidden;height:540px;display:flex;flex-direction:column;position:relative;}
|
| 164 |
.frame{flex:1;position:relative;overflow:hidden;}
|
| 165 |
.frame iframe{position:absolute;width:166.667%;height:166.667%;transform:scale(.6);transform-origin:top left;border:0;}
|
|
|
|
| 166 |
.card-label{position:absolute;top:10px;left:10px;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:bold;z-index:100;text-transform:uppercase;letter-spacing:0.5px;box-shadow:0 2px 4px rgba(0,0,0,0.2);}
|
| 167 |
.label-live{background:linear-gradient(135deg, #00c6ff, #0072ff);color:white;}
|
|
|
|
| 168 |
.foot{height:44px;background:#fafafa;display:flex;align-items:center;justify-content:center;border-top:1px solid #eee;}
|
| 169 |
.foot a{font-size:.82rem;font-weight:700;color:#4a6dd8;text-decoration:none;}
|
| 170 |
.pagination{display:flex;justify-content:center;margin:20px 0;gap:10px;}
|
|
|
|
| 178 |
<p>
|
| 179 |
<a href="https://huggingface.co/OpenFreeAI" target="_blank"><img src="https://img.shields.io/static/v1?label=Community&message=OpenFree_AI&color=%23800080&labelColor=%23000080&logo=HUGGINGFACE&logoColor=%23ffa500&style=for-the-badge" alt="badge"></a>
|
| 180 |
<a href="https://discord.gg/openfreeai" target="_blank"><img src="https://img.shields.io/static/v1?label=Discord&message=Openfree%20AI&color=%230000ff&labelColor=%23800080&logo=discord&logoColor=white&style=for-the-badge" alt="badge"></a>
|
|
|
|
| 181 |
</p>
|
| 182 |
</header>
|
| 183 |
<div class="tabs" id="tabs"></div>
|
|
|
|
| 188 |
const content = document.getElementById('content');
|
| 189 |
let active = "";
|
| 190 |
let currentPage = 1;
|
| 191 |
+
function makeRequest(url, callback) {
|
| 192 |
+
fetch(url).then(r => r.json()).then(callback);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
}
|
| 194 |
function updateTabs() {
|
| 195 |
Array.from(tabs.children).forEach(b => {
|
|
|
|
| 204 |
|
| 205 |
content.innerHTML = '<p style="text-align:center;padding:40px">Loadingโฆ</p>';
|
| 206 |
|
| 207 |
+
makeRequest('/api/category?name=' + encodeURIComponent(cat) + '&page=' + currentPage + '&per_page=4', function(data) {
|
| 208 |
let html = '<div class="grid">';
|
| 209 |
|
| 210 |
if(data.items.length === 0) {
|
| 211 |
+
html += '<p style="grid-column:1/-1;text-align:center;padding:40px">No items.</p>';
|
| 212 |
} else {
|
| 213 |
data.items.forEach(item => {
|
| 214 |
html += `
|
|
|
|
| 226 |
}
|
| 227 |
|
| 228 |
html += '</div>';
|
|
|
|
| 229 |
html += `
|
| 230 |
<div class="pagination">
|
| 231 |
<button ${currentPage <= 1 ? 'disabled' : ''} onclick="loadCategory('${cat}', ${currentPage-1})">ยซ Previous</button>
|
|
|
|
| 260 |
</body>
|
| 261 |
</html>'''
|
| 262 |
|
| 263 |
+
@flask_app.route('/')
|
| 264 |
def home():
|
| 265 |
return render_template_string(HTML_TEMPLATE, cats=list(CATEGORIES.keys()))
|
| 266 |
|
| 267 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโ GRADIO WRAPPER โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 268 |
+
app = gr.mount_gradio_app(flask_app, gr.Blocks(), path="/")
|
| 269 |
+
|
| 270 |
if __name__ == '__main__':
|
| 271 |
+
app.launch()
|