<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Likhitha Kothrepally on Medium]]></title>
        <description><![CDATA[Stories by Likhitha Kothrepally on Medium]]></description>
        <link>https://medium.com/@likhitha-kothrepally?source=rss-d92e9107d7af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Likhitha Kothrepally on Medium</title>
            <link>https://medium.com/@likhitha-kothrepally?source=rss-d92e9107d7af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 21:09:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@likhitha-kothrepally/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ Chat With Your PDFs, A Generative AI Project for Every Enthusiast]]></title>
            <link>https://medium.com/@likhitha-kothrepally/chat-with-your-pdfs-a-generative-ai-project-for-every-enthusiast-609376a6baae?source=rss-d92e9107d7af------2</link>
            <guid isPermaLink="false">https://medium.com/p/609376a6baae</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[gen-ai-for-business]]></category>
            <dc:creator><![CDATA[Likhitha Kothrepally]]></dc:creator>
            <pubDate>Fri, 05 Sep 2025 05:37:31 GMT</pubDate>
            <atom:updated>2025-09-05T05:51:57.164Z</atom:updated>
            <content:encoded><![CDATA[<h3>🌟 Introduction</h3><p>As a <strong>Generative AI enthusiast</strong>, I’m exploring practical ways to combine <strong>LLMs, and real-world use cases</strong>. One project that excited me recently is something simple but powerful:</p><p>👉 <strong>Upload your PDF documents and chat with them in natural language.</strong></p><p>In this post, I’ll walk you step by step through:</p><ol><li>What the app does</li><li>How it works (architecture)</li><li>How to run it locally</li><li>How to deploy it on <strong>Streamlit Cloud</strong></li><li>Example questions to try</li><li>Common issues &amp; fixes</li></ol><p>And yes you can try the <strong>live demo</strong> here:<br> 🔗 <a href="https://chat-with-pdfs-j4hd5t9kc5fdjduzsonbzk.streamlit.app/">Chat With PDFs App</a></p><h3>💡 What the App Does</h3><ul><li>📄 Upload one or more PDFs</li><li>✂️ Extracts text, splits it into chunks</li><li>🔍 Generates embeddings (OpenAI or HuggingFace fallback)</li><li>⚡ Stores them in <strong>FAISS</strong> for fast similarity search</li><li>🤖 Lets you chat conversationally with your documents</li><li>🧠 Maintains context across questions with conversation memory</li></ul><h3>🛠 Tech Stack</h3><ul><li><strong>Frontend/UI</strong> → <a href="https://streamlit.io/">Streamlit</a></li><li><strong>LLM Framework</strong> → <a href="https://www.langchain.com/">LangChain</a></li><li><strong>Embeddings</strong> → <a href="https://platform.openai.com/">OpenAI</a> (primary) + <a href="https://huggingface.co/">HuggingFace</a> fallback</li><li><strong>Vector Store</strong> → <a href="https://faiss.ai/">FAISS</a></li><li><strong>PDF Processing</strong> → <a href="https://pypi.org/project/pypdf2/">PyPDF2</a></li></ul><h3>⚙️ How It Works (Architecture)</h3><ol><li><strong>PDF Upload</strong> → User uploads files in Streamlit sidebar.</li><li><strong>Text Extraction</strong> → PyPDF2 reads pages and extracts text.</li><li><strong>Chunking</strong> → LangChain splits text into ~1000-character chunks with overlap.</li><li><strong>Embeddings</strong> →</li></ol><ul><li>OpenAI (if API key + quota available)</li><li>HuggingFace INSTRUCTOR as fallback (runs locally, free)</li></ul><p>5. <strong>Vector Search</strong> → FAISS indexes embeddings for retrieval.</p><p>6.<strong> Conversation Chain</strong> → LangChain’s Conversational Retrieval Chain + Chat OpenAI generates answers.</p><h3>🖥 Run Locally in 6 Steps</h3><h3>1. Clone repo</h3><pre>git clone https://github.com/likhitha-k8/Chat-with-PDFs</pre><h3>2. Create a virtual environment</h3><pre>python -m venv venv<br># Windows<br>venv\Scripts\activate<br># macOS/Linux<br>source venv/bin/activate</pre><h3>3. Install dependencies</h3><pre>pip install --upgrade pip<br>pip install streamlit==1.36.0 python-dotenv==1.0.1 PyPDF2==3.0.1<br>pip install faiss-cpu==1.12.0<br>pip install langchain==0.2.16 langchain-community==0.2.16 langchain-openai==0.2.6 openai==1.40.6<br>pip install sentence-transformers==2.7.0 InstructorEmbedding==1.0.1</pre><h3>4. Add API Key (optional if only using HuggingFace)</h3><p>Create a .env file:</p><pre>OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx</pre><h3>5. Run the app</h3><pre>streamlit run app.py</pre><h3>6. Open in browser</h3><p>Go to 👉 <a href="http://localhost:8501/">http://localhost:8501</a></p><h3>🌍 Deploy on Streamlit Cloud</h3><ol><li>Push your code to <strong>GitHub</strong></li><li>Go to <a href="https://streamlit.io/">streamlit.io</a> → Deploy → select your repo</li><li>Choose branch → main file = app.py</li><li>Add your <strong>OpenAI key</strong> in Secrets:</li></ol><ul><li>OPENAI_API_KEY = xxxxxxxxxxxxxxxx</li></ul><ol><li>Use this requirements.txt for deployment:</li></ol><pre><br>streamlit==1.36.0<br>python-dotenv==1.0.1<br>PyPDF2==3.0.1<br><br>langchain==0.2.16<br>langchain-community==0.2.16<br>langchain-openai==0.2.6<br>openai==1.40.6<br><br>faiss-cpu==1.12.0<br><br>sentence-transformers==2.7.0<br>InstructorEmbedding==1.0.1</pre><h3>💬 Example Questions to Try</h3><ol><li>What are the key points in the document?</li><li>Summarize the conclusion in 3 bullet points.</li><li>What challenges are mentioned in this document?</li><li>List the main recommendations from the report.</li></ol><h3>⚠️ Troubleshooting</h3><ul><li><strong>429 RateLimitError / insufficient_quota</strong> → Add billing in OpenAI or switch to HuggingFace embeddings.</li><li><strong>faiss-cpu==1.7.4 error on Streamlit Cloud</strong> → Use faiss-cpu==1.12.0 (compatible with Py3.13).</li><li><strong>AttributeError: module &#39;openai&#39; has no attribute &#39;error&#39;</strong> → Upgrade to openai&gt;=1.0 and update imports.</li><li><strong>run supports only one positional argument</strong> → Use .invoke({&quot;question&quot;: &quot;...&quot;}) instead of .run({…}).</li><li><strong>pydantic_core errors</strong> → Reinstall:</li></ul><pre>pip install --upgrade --force-reinstall &quot;pydantic&gt;=2,&lt;3&quot; &quot;pydantic-core&gt;=2,&lt;3&quot;</pre><h3>📌Key Learnings</h3><ul><li>Generative AI can be made <strong>practical</strong> with simple tools like Streamlit + LangChain.</li><li>Always plan for <strong>fallbacks</strong> (OpenAI quota → HuggingFace embeddings).</li><li>Deployment often fails because of <strong>Python version mismatches, </strong>use up-to-date packages.</li><li>Even small projects teach a lot about <strong>real-world LLM engineering</strong>.</li></ul><h3>🎯 Conclusion</h3><p>As a <strong>Gen AI enthusiast</strong>, building this project was both fun and insightful.</p><p>If you’re curious, give it a try:<br> 👉 <a href="https://drive.google.com/file/d/1hIYjpBeKvraQ_98wS22WciHYW6SKjOUq/view?usp=sharing">Live Video Demo</a></p><p>Would love to hear your thoughts, questions, or improvements! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=609376a6baae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>