<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pravin Kumar P</title>
    <description>The latest articles on DEV Community by Pravin Kumar P (@hotsniper9910).</description>
    <link>https://dev.to/hotsniper9910</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Pravin Kumar P</title>
      <link>https://dev.to/hotsniper9910</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hotsniper9910"/>
    <language>en</language>
    <item>
      <title>hacks power</title>
      <dc:creator>Pravin Kumar P</dc:creator>
      <pubDate>Sat, 03 Oct 2026 18:39:35 +0000</pubDate>
      <link>https://dev.to/hotsniper9910/hacks-power-1c5j</link>
      <guid>https://dev.to/hotsniper9910/hacks-power-1c5j</guid>
      <description>&lt;p&gt;from fastapi import FastAPI, UploadFile, File&lt;br&gt;
from fastapi.responses import HTMLResponse&lt;br&gt;
import ollama&lt;br&gt;
import chromadb&lt;br&gt;
from faster_whisper import WhisperModel&lt;br&gt;
import os&lt;br&gt;
import uuid&lt;/p&gt;

&lt;p&gt;app = FastAPI()&lt;/p&gt;

&lt;p&gt;UPLOAD_DIR = "uploads"&lt;br&gt;
os.makedirs(UPLOAD_DIR, exist_ok=True)&lt;/p&gt;

&lt;h1&gt;
  
  
  Local embedding database
&lt;/h1&gt;

&lt;p&gt;client = chromadb.PersistentClient(path="./memory.db")&lt;/p&gt;

&lt;p&gt;collection = client.get_or_create_collection(&lt;br&gt;
    name="memories"&lt;br&gt;
)&lt;/p&gt;

&lt;h1&gt;
  
  
  Local speech-to-text model
&lt;/h1&gt;

&lt;p&gt;whisper = WhisperModel(&lt;br&gt;
    "base",&lt;br&gt;
    device="cpu",&lt;br&gt;
    compute_type="int8"&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;def ask_ai(prompt):&lt;br&gt;
    response = ollama.chat(&lt;br&gt;
        model="qwen3:4b",&lt;br&gt;
        messages=[&lt;br&gt;
            {&lt;br&gt;
                "role": "system",&lt;br&gt;
                "content": """&lt;br&gt;
You are OpenMemo, a private personal memory assistant.&lt;br&gt;
Use only the information provided by the user.&lt;br&gt;
Do not invent memories.&lt;br&gt;
Be concise and helpful.&lt;br&gt;
"""&lt;br&gt;
            },&lt;br&gt;
            {&lt;br&gt;
                "role": "user",&lt;br&gt;
                "content": prompt&lt;br&gt;
            }&lt;br&gt;
        ]&lt;br&gt;
    )&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return response["message"]["content"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;@app.post("/upload")&lt;br&gt;
async def upload(file: UploadFile = File(...)):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file_id = str(uuid.uuid4())
path = f"{UPLOAD_DIR}/{file_id}_{file.filename}"

with open(path, "wb") as f:
    f.write(await file.read())

segments, info = whisper.transcribe(path)

text = " ".join(
    segment.text for segment in segments
)

collection.add(
    documents=[text],
    ids=[file_id],
    metadatas=[
        {
            "filename": file.filename
        }
    ]
)

return {
    "success": True,
    "transcription": text
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;@app.get("/ask")&lt;br&gt;
def ask(question: str):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;results = collection.query(
    query_texts=[question],
    n_results=5
)

memories = "\n".join(
    results["documents"][0]
)

answer = ask_ai(
    f"""
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Relevant memories:&lt;/p&gt;

&lt;p&gt;{memories}&lt;/p&gt;

&lt;p&gt;Question:&lt;/p&gt;

&lt;p&gt;{question}&lt;/p&gt;

&lt;p&gt;Answer using only the relevant memories.&lt;br&gt;
"""&lt;br&gt;
    )&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return {
    "answer": answer,
    "memories": results["documents"][0]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;@app.get("/")&lt;br&gt;
def home():&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return HTMLResponse("""
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
    &lt;/p&gt;
OpenMemo

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;style&amp;gt;
    body {
        font-family: Arial;
        max-width: 800px;
        margin: 50px auto;
        padding: 20px;
        background: #f5f5f5;
    }

    .card {
        background: white;
        padding: 25px;
        border-radius: 15px;
        margin-bottom: 20px;
    }

    button {
        padding: 12px 20px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }

    input {
        padding: 12px;
        width: 70%;
    }

    #answer {
        margin-top: 20px;
        white-space: pre-wrap;
    }
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h1&gt;🧠 OpenMemo&lt;/h1&gt;

&lt;h2&gt;Add a memory&lt;/h2&gt;

&lt;p&gt;Upload&lt;/p&gt;



&lt;h2&gt;Ask your memories&lt;/h2&gt;

&lt;p&gt;Ask AI&lt;/p&gt;

&lt;p&gt;async function upload() {&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const file =
    document.getElementById("audio").files[0];

if (!file) {
    alert("Choose an audio file first.");
    return;
}

const form = new FormData();

form.append("file", file);

const response =
    await fetch("/upload", {
        method: "POST",
        body: form
    });

const data = await response.json();

document.getElementById("result").innerText =
    "Saved memory:\\n" + data.transcription;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;async function ask() {&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const question =
    document.getElementById("question").value;

const response =
    await fetch(
        "/ask?question=" +
        encodeURIComponent(question)
    );

const data = await response.json();

document.getElementById("answer").innerText =
    data.answer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
&lt;br&gt;
""")&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>HACKS POWER</title>
      <dc:creator>Pravin Kumar P</dc:creator>
      <pubDate>Sat, 03 Oct 2026 18:34:57 +0000</pubDate>
      <link>https://dev.to/hotsniper9910/hacks-power-16i0</link>
      <guid>https://dev.to/hotsniper9910/hacks-power-16i0</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>hacks</title>
      <dc:creator>Pravin Kumar P</dc:creator>
      <pubDate>Sat, 03 Oct 2026 18:33:58 +0000</pubDate>
      <link>https://dev.to/hotsniper9910/hacks-4el9</link>
      <guid>https://dev.to/hotsniper9910/hacks-4el9</guid>
      <description>&lt;p&gt;new game starts&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
