Skip to content

Instantly share code, notes, and snippets.

@lisakim0
lisakim0 / app.py
Created January 24, 2025 06:26
A Retrieval-Augmented Generation (RAG) system for PDF document analysis using DeepSeek-R1 and Ollama.
import streamlit as st
from langchain_community.document_loaders import PDFPlumberLoader
from langchain_experimental.text_splitter import SemanticChunker
from langchain_community.embeddings import HuggingFaceEmbeddings
from langchain_community.vectorstores import FAISS
from langchain_community.llms import Ollama
from langchain.prompts import PromptTemplate
from langchain.chains.llm import LLMChain
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
from langchain.chains import RetrievalQA
@kiyoon
kiyoon / ffmpeg_nvidia_conda_install.sh
Last active May 6, 2025 08:15
Install nvidia accelerated ffmpeg in a conda environment.
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
vi Makefile # change the first line to PREFIX = ${CONDA_PREFIX}
make install
cd ..
git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
git checkout n4.2.2
conda install nasm