============================================

👟 MONAD STYLE AI - دستیار هوشمند فروشگاه کفش

============================================

📦 حجم مدل: فقط ۷ مگابایت

🎯 دقت: ۹۰٪ پاسخگویی به سوالات کاربران

⚡ اجرا روی CPU معمولی - بدون نیاز به GPU

🔌 کاملاً آفلاین - بدون نیاز به اینترنت

============================================

🚀 نحوه استفاده:

1. نصب numpy:

 pip install numpy

2. دانلود فایل advanced_model.pkl

3. اجرا: python chat.py

4. برای خروج: exit یا quit یا خروج

============================================

نحوه اجرای مدل بعد از نصب

============================================

کد اصلی برنامه (chat.py) در ادامه آورده شده است:

import pickle, re, numpy as np
from collections import defaultdict

with open("advanced_model.pkl", 'rb') as f:
    m = pickle.load(f)

def vec(t):
    v = np.zeros(len(m['word_to_idx']))
    for w in re.findall(r'\w+', t.lower()):
        if w in m['word_to_idx']: v[m['word_to_idx'][w]] += 1
    n = np.linalg.norm(v)
    return v / n if n > 0 else v

while True:
    t = input("\n👤 شما: ").strip()
    if t in ['exit','quit','خروج']: break
    if not t: continue
    
    w = set(re.findall(r'\w+', t.lower()))
    s = {}
    for i, info in m['knowledge_base'].items():
        mt = [x for x in w if x in info['words']]
        if mt:
            sc = info.get('weight',5)*len(mt)
            if i == 'recommend_activity':
                bw = set(m['knowledge_base'].get('ask_brand',{}).get('words',[]))
                if w & bw: sc += 20
            if i == 'ask_stock' and len(mt)<=2:
                if any(x for oi in m['knowledge_base'] if oi!='ask_stock' for x in w if x in m['knowledge_base'][oi]['words']): sc *= 0.3
            s[i] = sc * (1.5 - info.get('priority',3)*0.1)
    
    if s:
        best = max(s, key=s.get)
        conf = min(s[best]/25, 0.95)*100
        cand = m['intent_samples'].get(best, [])
        if cand:
            qv = vec(t)
            bs, br = -1, cand[0]['response']
            for c in cand[:10]:
                inp = c.get('input','')
                if inp:
                    sim = np.dot(qv, vec(inp))
                    if sim > bs: bs, br = sim, c['response']
            print(f"🤖 {br}")
            print(f"🎯 {best} | 📊 {conf:.0f}%")
    else:
        qv = vec(t)
        sims = m['response_matrix'] @ qv
        print(f"🤖 {m['response_texts'][np.argmax(sims)]}")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support