text stringlengths 0 100 |
|---|
AI Scout mini |
============= |
WHAT THIS IS |
A small desktop window: type what you are hunting for (AI skills, |
generators, pipelines, prompt collections), press Search, and it asks |
the Hugging Face Hub for models, Spaces and datasets that match. |
Select rows -> Save selected, and each one lands in |
%USERPROFILE%\AI-Skills\<kind>\<name>\ with a skill.json and a |
HOWTO.txt containing a copy-paste snippet for that item. |
HOW TO RUN |
1. Python 3 must be installed (python.org, tick 'Add python.exe to PATH'). |
Check in PowerShell: py --version |
2. Double-click 'Start AI Scout.bat' |
or in a terminal: py ai_scout.py |
3. No pip install needed - standard library only. |
NOTES |
- Needs internet access (it calls the public Hugging Face API). |
- Double-click a result to open it in your browser. |
- Nothing is installed or executed automatically; you only get files. |
@echo off |
cd /d "%~dp0" |
py ai_scout.py |
if errorlevel 1 pause |
#!/usr/bin/env python3 |
"""AI Scout mini - type what you are hunting for, get real AI skills back, |
and save the good ones into a local library folder you can browse. |
Standard library only. Run: py ai_scout.py |
""" |
import json |
import os |
import platform |
import re |
import subprocess |
import threading |
import urllib.parse |
import urllib.request |
from pathlib import Path |
import tkinter as tk |
from tkinter import ttk |
LIB = Path.home() / "AI-Skills" |
UA = {"User-Agent": "ai-scout-mini/1.0"} |
API = { |
"model": "https://huggingface.co/api/models", |
"space": "https://huggingface.co/api/spaces", |
"dataset": "https://huggingface.co/api/datasets", |
} |
STOP = {"the", "and", "with", "for", "from", "that", "this", "are", "you", |
"want", "find", "looking", "some", "most", "all", "best", "example", |
"examples", "etc", "about", "into", "using", "use", "how", "what", |
"which", "me", "my", "give", "show", "get", "need"} |
def http_json(base, params): |
url = base + "?" + urllib.parse.urlencode(params) |
req = urllib.request.Request(url, headers=UA) |
with urllib.request.urlopen(req, timeout=25) as resp: |
return json.loads(resp.read().decode("utf-8", "replace")) |
def plan(text): |
words = [w for w in re.findall(r"[a-z0-9\-]{3,}", text.lower()) if w not in STOP] |
out = [] |
if len(words) >= 2: |
out.append(" ".join(words[:2])) |
if len(words) >= 3: |
out.append(" ".join(words[:3])) |
out += words[:3] |
return list(dict.fromkeys(out))[:4] or ["llm"] |
def search(query, per=10): |
rows = [] |
for kind, base in API.items(): |
sort = "likes" if kind == "space" else "downloads" |
try: |
data = http_json(base, {"search": query, "limit": per, |
"sort": sort, "direction": -1}) |
except Exception: |
try: |
data = http_json(base, {"search": query, "limit": per}) |
except Exception: |
continue |
for r in data or []: |
rid = r.get("id") or "" |
if not rid: |
continue |
if kind == "space": |
url = f"https://huggingface.co/spaces/{rid}" |
elif kind == "dataset": |
url = f"https://huggingface.co/datasets/{rid}" |
else: |
url = f"https://huggingface.co/{rid}" |
rows.append({"id": rid, "kind": kind, "url": url, |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 41