Sunday, 24 May 2026

langchain mein if chabot bana ho but like uska code invoke na support

 from transformers import AutoTokenizer, AutoModelForCausalLM

from langchain_core.runnables import RunnableLambda


model_name = "Qwen/Qwen3-0.6B"


tokenizer = AutoTokenizer.from_pretrained(model_name)


model = AutoModelForCausalLM.from_pretrained(

    model_name,

    device_map="auto"

)


def generate_response(user_input):


    messages = [

        {"role": "user", "content": user_input}

    ]


    text = tokenizer.apply_chat_template(

        messages,

        tokenize=False,

        add_generation_prompt=True,

        enable_thinking=True

    )


    inputs = tokenizer(text, return_tensors="pt").to(model.device)


    outputs = model.generate(

        **inputs,

        max_new_tokens=200

    )


    response = tokenizer.decode(

        outputs[0][inputs.input_ids.shape[1]:],

        skip_special_tokens=True

    )


    return response


llm = RunnableLambda(generate_response)


print(llm.invoke("Who are Eldians in AOT?"))

Friday, 15 May 2026

Wednesday, 13 May 2026

3rd year chutti

 1. project -: 

2. leetcode- legularly 

3. gen ai -regularly 

4. cs funcdamental 

5. english speaking : regularly 

6. deep learning and ml ki practice -: 

Friday, 8 May 2026

docker ka use

 watch campusx video 

then fastapi wale course m se repo m dockerfile wali file dekh

https://chatgpt.com/share/69fe4e12-148c-83e8-9d78-05c8686a46e8

Saturday, 18 April 2026

page bana jisse har section pe naya page aa jaye

 Samajh gaya bhai — tu “scroll pe next section / page jaisa feel” wali website banana chahta hai (like Apple, landing pages, etc.).

Isko bolte hain 👉 Single Page Scroll Website (sections instead of pages)


🧠 Concept simple hai:

  • Ek hi page hota hai

  • Usme multiple sections (divs) hote hain

  • Har section = ek “page jaisa feel”

  • Scroll karte hi next section full screen pe aata hai


🔥 Basic React Example (Full Working)

📁 Structure

src/
 ├── App.jsx
 ├── App.css

✅ App.jsx

import './App.css';

function App() {
  return (
    <div className="container">

      <section className="section section1">
        <h1>Welcome to the World of Automation</h1>
        <p>Easytrain</p>
      </section>

      <section className="section section2">
        <h1>Our Services</h1>
        <p>We build smart automation solutions</p>
      </section>

      <section className="section section3">
        <h1>About Us</h1>
        <p>We are a tech-driven company</p>
      </section>

      <section className="section section4">
        <h1>Contact</h1>
        <p>Get in touch with us</p>
      </section>

    </div>
  );
}

export default App;

🎨 App.css

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
}

.section {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

/* Different colors for sections */
.section1 {
  background: #111;
  color: white;
}

.section2 {
  background: #007bff;
  color: white;
}

.section3 {
  background: #28a745;
  color: white;
}

.section4 {
  background: #ffc107;
  color: black;
}

✨ Result kya hoga:

  • Har scroll pe ek naya “page-like section”

  • Smooth snapping effect 🔥

  • Modern landing page feel


🚀 Advanced (next level banana hai?)

Agar tu aur pro banana chahta hai toh use kar:

  • framer-motion → animations

  • react-scroll → smooth navigation

  • locomotive-scroll → premium scrolling feel


🧠 Real world example:

  • Apple website 🍎

  • Tesla website 🚗

  • Startup landing pages


Agar tu bole toh main tujhe:
👉 animation + navbar + smooth scroll + modern UI wala full project bana ke de sakta hoon (resume level 🔥)

Saturday, 4 April 2026

graph neural nw ke sath work ke liye

 https://chatgpt.com/share/69d11f52-52cc-8324-af40-0d5e8ab1af3c



ye kaggle ka data 

https://www.kaggle.com/competitions/openaimer26-1/data

Hello

langchain mein if chabot bana ho but like uska code invoke na support

 from transformers import AutoTokenizer, AutoModelForCausalLM from langchain_core.runnables import RunnableLambda model_name = "Qwen/Qw...