Skip to content

Instantly share code, notes, and snippets.

View sudarshan-koirala's full-sized avatar
🎯
Focusing

Sudarshan Koirala sudarshan-koirala

🎯
Focusing
View GitHub Profile
import ollama
import time
def read_file(file_path):
"""
Reads the content of a file and decodes it using the 'latin-1' encoding.
Args:
file_path (str): The path to the file to be read.
@sudarshan-koirala
sudarshan-koirala / privateGPT_uichat.py
Created May 15, 2023 14:05
Gradio UI part of the privateGPT github repo
# Disclamer: This code is not written by me. Its taken from https://github.com/imartinez/privateGPT/pull/91.
# All credit goes to `vnk8071` as I mentioned in the video.
# As this code was still in the pull request while I was creating the video, did some modifications so that it works for me locally.
import gradio as gr
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.chains import RetrievalQA
from langchain.embeddings import LlamaCppEmbeddings
from langchain.llms import GPT4All, LlamaCpp
from langchain.vectorstores import Chroma
@sudarshan-koirala
sudarshan-koirala / sample.md
Created March 29, 2019 19:51 — forked from bradtraversy/sample.md
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

@sudarshan-koirala
sudarshan-koirala / README.md
Created July 26, 2016 12:23 — forked from hofmannsven/README.md
My simply Git Cheatsheet