
{"id":4529,"date":"2025-02-09T18:43:19","date_gmt":"2025-02-09T10:43:19","guid":{"rendered":"https:\/\/infernews.com\/?p=4529"},"modified":"2025-02-09T18:43:48","modified_gmt":"2025-02-09T10:43:48","slug":"%e4%bb%a5-gradio-%e6%9c%ac%e5%9c%b0%e9%81%8b%e8%a1%8c-rag-deepseek-r1","status":"publish","type":"post","link":"https:\/\/infernews.com\/blog\/%e4%bb%a5-gradio-%e6%9c%ac%e5%9c%b0%e9%81%8b%e8%a1%8c-rag-deepseek-r1\/","title":{"rendered":"\u4ee5 Gradio \u672c\u5730\u904b\u884c RAG DeepSeek R1"},"content":{"rendered":"\n<p>\u5f71\u7247\u6559\u4f60\u5982\u4f55\u5efa\u7acb\u4e00\u500b\u7c21\u55ae\u7684 Web \u61c9\u7528\u7a0b\u5f0f\uff0c\u4f7f\u7528 Ollama LangChain \u548c Gradio\uff0c\u900f\u904e\u6aa2\u7d22\u589e\u5f37\u751f\u6210 (RAG) \u4f86\u67e5\u8a62 PDF \u6587\u4ef6\u3002\u7121\u8ad6\u4f60\u662f AI \u7684\u521d\u5b78\u8005\u6216\u5df2\u6709\u7d93\u9a57\uff0c\u53ea\u8981\u6709\u8208\u8da3\u7528 Web \u904b\u884c AI \u6a21\u578b\uff0c\u9019\u6559\u5b78\u90fd\u975e\u5e38\u5be6\u7528\u3002\u7531\u65bc\u652f\u6301\u96e2\u7dda\u904b\u4f5c\uff0c\u56e0\u6b64\u80fd\u5920\u589e\u52a0\u5b89\u5168\u6027\uff0c\u4fdd\u969c\u79c1\u96b1\uff0c\u7279\u5225\u662f\u5c0d\u65bc\u4f7f\u7528 AI \u8655\u7406\u516c\u53f8\u5167\u90e8\u6587\u4ef6\u5605\u4efb\u52d9\u3002<\/p>\n\n\n\n<figure class=\"wp-block-audio\"><audio controls src=\"\/blog\/wp-content\/uploads\/2025\/02\/1739097555392147167-235702628286698.mp3\"><\/audio><\/figure>\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"lyte-wrapper\" title=\"Run DeepSeek R1 Locally With Ollama | Build a Local Gradio App for RAG\" style=\"width:853px;max-width:100%;margin:5px auto;\"><div class=\"lyMe\" id=\"WYL_hOsZzcMYMLI\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\"><div><meta itemprop=\"thumbnailUrl\" content=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhOsZzcMYMLI%2Fhqdefault.jpg\" \/><meta itemprop=\"embedURL\" content=\"https:\/\/www.youtube.com\/embed\/hOsZzcMYMLI\" \/><meta itemprop=\"duration\" content=\"PT45M24S\" \/><meta itemprop=\"uploadDate\" content=\"2025-02-07T15:01:01Z\" \/><\/div><meta itemprop=\"accessibilityFeature\" content=\"captions\" \/><div id=\"lyte_hOsZzcMYMLI\" data-src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhOsZzcMYMLI%2Fhqdefault.jpg\" class=\"pL\"><div class=\"tC\"><div class=\"tT\" itemprop=\"name\">Run DeepSeek R1 Locally With Ollama | Build a Local Gradio App for RAG<\/div><\/div><div class=\"play\"><\/div><div class=\"ctrl\"><div class=\"Lctrl\"><\/div><div class=\"Rctrl\"><\/div><\/div><\/div><noscript><a href=\"https:\/\/youtu.be\/hOsZzcMYMLI\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhOsZzcMYMLI%2F0.jpg\" alt=\"Run DeepSeek R1 Locally With Ollama | Build a Local Gradio App for RAG\" width=\"853\" height=\"460\" \/><br \/>Watch this video on YouTube<\/a><\/noscript><meta itemprop=\"description\" content=\"In this tutorial, you\u2019ll learn how to download DeepSeek R1 on your local machine to securely query PDF documents using retrieval-augmented generation (RAG). We walk through every step, from downloading and configuring the model with Ollama to building a Gradio-based web app that processes PDF files using LangChain and vector databases. Whether you\u2019re on a Mac or Windows, this video covers data preprocessing, text embedding, and semantic search, giving you a comprehensive understanding of local AI-assisted document queries without any reliance on the cloud. \ud83d\udd17 Resources &amp; Tutorials To copy the solution code, press on this link: https:\/\/bit.ly\/4hpF3du \u2014 You may need to sign up (for free!) to DataLab Developing LLM Applications with LangChain - https:\/\/www.datacamp.com\/courses\/developing-llm-applications-with-langchain How Transformers Work - https:\/\/www.datacamp.com\/tutorial\/how-transformers-work Fine-Tuning DeepSeek R1 Reasoning Model - https:\/\/www.datacamp.com\/tutorial\/fine-tuning-deepseek-r1-reasoning-model DeepSeek R1 Blog Overview - https:\/\/www.datacamp.com\/blog\/deepseek-r1 Understanding Janus Pro - https:\/\/www.datacamp.com\/blog\/janus-pro DeepSeek R1 Project Walkthrough - https:\/\/www.datacamp.com\/tutorial\/deepseek-r1-project DeepSeek vs ChatGPT - https:\/\/www.datacamp.com\/blog\/deepseek-vs-chatgpt Qwen-2.5 MAX Model - https:\/\/www.datacamp.com\/blog\/qwen-2-5-max DeepSeek R1 Ollama Tutorial - https:\/\/www.datacamp.com\/tutorial\/deepseek-r1-ollama Installing Anaconda on Windows - https:\/\/www.datacamp.com\/tutorial\/installing-anaconda-windows Installing Anaconda on Mac OS - https:\/\/www.datacamp.com\/tutorial\/installing-anaconda-mac-os-x \ud83d\udcda Chapters 00:00 Introduction 00:38 Why Run DeepSeek R1 Locally? 02:00 Overview of Retrieval-Augmented Generation (RAG) 05:20 Installing Ollama and Setting Up DeepSeek R1 09:50 Querying the Model Locally 14:40 Setting Up PDF Processing with LangChain 18:12 Understanding Embeddings and Vector Databases 25:05 Preprocessing PDF Files for RAG 32:30 Building the RAG Chain with LangChain 39:00 Creating a Gradio Web App for PDF Queries 43:30 Testing the PDF Query App 45:50 Uninstalling DeepSeek R1 and Ollama 47:30 Conclusion and Further Learning Resources \ud83d\udcf1 Follow Us on Social Facebook: https:\/\/www.facebook.com\/datacampinc\/ Twitter: https:\/\/twitter.com\/datacamp LinkedIn: https:\/\/www.linkedin.com\/school\/datacampinc\/ Instagram: https:\/\/www.instagram.com\/datacamp\/ #deepseek #DeepSeekR1 #AIchatbot #retrievalaugmentedgeneration #langchain #ollama #vectordatabase #embeddings #pdfsearch #localAI #semanticsearch #gradioapp #MacBookAI #secureAI #locallanguagemodel #deepseektutorial #machinelearning #AIfordocuments #transformersAI #offlineAIapplications #pythonAI #datacamp\"><\/div><\/div><div class=\"lL\" style=\"max-width:100%;width:853px;margin:5px auto;\"><\/div><figcaption><\/figcaption><\/figure>","protected":false},"excerpt":{"rendered":"<p>\u5f71\u7247\u6559\u4f60\u5982\u4f55\u5efa\u7acb\u4e00\u500b\u7c21\u55ae\u7684 Web \u61c9\u7528\u7a0b\u5f0f\uff0c\u4f7f\u7528 Ollama LangChain \u548c Gradio\uff0c\u900f\u904e\u6aa2\u7d22\u589e\u5f37\u751f\u6210 (RAG) \u4f86\u67e5\u8a62 PDF \u6587\u4ef6\u3002\u7121\u8ad6\u4f60\u662f AI \u7684\u521d\u5b78\u8005\u6216\u5df2\u6709\u7d93\u9a57\uff0c\u53ea\u8981\u6709\u8208\u8da3\u7528 Web \u904b\u884c AI \u6a21\u578b\uff0c\u9019\u6559\u5b78\u90fd\u975e\u5e38\u5be6\u7528\u3002\u7531\u65bc\u652f\u6301\u96e2\u7dda\u904b\u4f5c\uff0c\u56e0\u6b64\u80fd\u5920\u589e\u52a0\u5b89\u5168\u6027\uff0c\u4fdd\u969c\u79c1\u96b1\uff0c\u7279\u5225\u662f\u5c0d\u65bc\u4f7f\u7528 AI \u8655\u7406\u516c\u53f8\u5167\u90e8\u6587\u4ef6\u5605\u4efb\u52d9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowvqSiDA:productID":"","footnotes":""},"categories":[147,122,109],"tags":[],"class_list":["post-4529","post","type-post","status-publish","format-standard","hentry","category-deepseek","category-ollama","category-rag"],"_links":{"self":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/posts\/4529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/comments?post=4529"}],"version-history":[{"count":0,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/posts\/4529\/revisions"}],"wp:attachment":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/media?parent=4529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/categories?post=4529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/tags?post=4529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}