Daniel Tse
commited on
Commit
•
7814fef
1
Parent(s):
4fa56af
Add import of langchain
Browse files- app.py +4 -2
- requirements.txt +5 -0
app.py
CHANGED
@@ -8,9 +8,11 @@ from pydub import AudioSegment
|
|
8 |
from nltk import sent_tokenize
|
9 |
nltk.download('punkt')
|
10 |
|
11 |
-
|
12 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
13 |
-
|
|
|
|
|
|
|
14 |
|
15 |
def transcribe_audio(audiofile):
|
16 |
|
|
|
8 |
from nltk import sent_tokenize
|
9 |
nltk.download('punkt')
|
10 |
|
|
|
11 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
12 |
+
from langchain.embeddings.openai import OpenAIEmbeddings
|
13 |
+
from langchain.vectorstores import Chroma
|
14 |
+
from langchain.chat_models import ChatOpenAI
|
15 |
+
from langchain.chains import RetrievalQA
|
16 |
|
17 |
def transcribe_audio(audiofile):
|
18 |
|
requirements.txt
CHANGED
@@ -3,3 +3,8 @@ transformers
|
|
3 |
git+https://github.com/openai/whisper.git
|
4 |
AudioSegment
|
5 |
nltk==3.7
|
|
|
|
|
|
|
|
|
|
|
|
3 |
git+https://github.com/openai/whisper.git
|
4 |
AudioSegment
|
5 |
nltk==3.7
|
6 |
+
openai
|
7 |
+
langchain
|
8 |
+
tiktoken
|
9 |
+
chromadb
|
10 |
+
tabulate
|