Kathir0011 commited on
Commit
8ce3ee8
·
verified ·
1 Parent(s): 9fbf065

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,12 +36,12 @@ def create_db_from_video_url(video_url, api_key):
36
  transcripts = get_transcript(video_url)
37
 
38
  # Convert transcript string into a Document
39
- doc = Document(page_content=transcripts)
40
 
41
  print(transcripts)
42
  # cannot provide this directly to the model so we are splitting the transcripts into small chunks
43
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
44
- docs = text_splitter.split_documents(transcripts)
45
  print(docs)
46
 
47
  db = FAISS.from_documents(docs, embedding=embeddings)
 
36
  transcripts = get_transcript(video_url)
37
 
38
  # Convert transcript string into a Document
39
+ docs = Document(page_content=transcripts)
40
 
41
  print(transcripts)
42
  # cannot provide this directly to the model so we are splitting the transcripts into small chunks
43
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
44
+ docs = text_splitter.split_documents(docs)
45
  print(docs)
46
 
47
  db = FAISS.from_documents(docs, embedding=embeddings)