bisoye commited on
Commit
e7ed36c
1 Parent(s): 9bad7f1

Update summarizer.py

Browse files
Files changed (1) hide show
  1. summarizer.py +1 -2
summarizer.py CHANGED
@@ -3,14 +3,13 @@ from langchain_community.document_loaders import UnstructuredPowerPointLoader
3
  from langchain_cohere.llms import Cohere
4
  from langchain.chains.summarize import load_summarize_chain
5
  from pathlib import Path
6
- import os
7
 
8
  def summarize_files(method, files):
9
  # Initialize the LLM
10
  llm = Cohere(temperature=0)
11
  summaries = []
12
  # Load and read each file
13
- for file in os.listdir(files):
14
 
15
  file_path = os.path.join(files, file)
16
  ext = Path(file_path).suffix.lower()
 
3
  from langchain_cohere.llms import Cohere
4
  from langchain.chains.summarize import load_summarize_chain
5
  from pathlib import Path
 
6
 
7
  def summarize_files(method, files):
8
  # Initialize the LLM
9
  llm = Cohere(temperature=0)
10
  summaries = []
11
  # Load and read each file
12
+ for file in files:
13
 
14
  file_path = os.path.join(files, file)
15
  ext = Path(file_path).suffix.lower()