Create main
Browse files
main
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
from langchain.llms import OpenAI
|
4 |
+
from langchain.chat_models import ChatOpenAI
|
5 |
+
from langchain.chains import ConversationalRetrievalChain
|
6 |
+
from langchain.document_loaders import PyPDFLoader, Docx2txtLoader
|
7 |
+
from langchain.embeddings import OpenAIEmbeddings
|
8 |
+
from langchain.vectorstores import Chroma
|
9 |
+
from langchain.memory import ConversationSummaryMemory, ConversationBufferMemory
|
10 |
+
from langchain.prompts import (
|
11 |
+
ChatPromptTemplate,
|
12 |
+
MessagesPlaceholder,
|
13 |
+
SystemMessagePromptTemplate,
|
14 |
+
HumanMessagePromptTemplate,
|
15 |
+
)
|
16 |
+
|
17 |
+
import gradio as gr
|
18 |
+
import datetime
|
19 |
+
from huggingface_hub import Repository
|
20 |
+
from datasets import load_dataset
|
21 |
+
import random
|
22 |
+
import string
|
23 |
+
from pyairtable import Api
|
24 |
+
|
25 |
+
os.environ["OPENAI_API_KEY"]
|
26 |
+
os.environ["HUB_TOKEN"]
|
27 |
+
os.environ["AIR_TOKEN"]
|
28 |
+
|