bstraehle commited on
Commit
369cd81
·
verified ·
1 Parent(s): 193c7ed

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +7 -3
crew.py CHANGED
@@ -201,13 +201,17 @@ def run_crew(question, file_path):
201
  if is_ext(file_path, ".docx"):
202
  file_data = read_docx(file_path)
203
  contents = [f"{question}\n{file_data}"]
204
- print("###")
205
- print(contents[0])
206
- print("###")
207
  else:
208
  file = client.files.upload(file=file_path)
209
  contents = [file, question]
210
 
 
 
 
 
211
  response = client.models.generate_content(
212
  model=DOCUMENT_ANALYSIS_MODEL,
213
  contents=contents
 
201
  if is_ext(file_path, ".docx"):
202
  file_data = read_docx(file_path)
203
  contents = [f"{question}\n{file_data}"]
204
+ if is_ext(file_path, ".pptx"):
205
+ file_data = read_pptx(file_path)
206
+ contents = [f"{question}\n{file_data}"]
207
  else:
208
  file = client.files.upload(file=file_path)
209
  contents = [file, question]
210
 
211
+ print("###")
212
+ print(contents[0])
213
+ print("###")
214
+
215
  response = client.models.generate_content(
216
  model=DOCUMENT_ANALYSIS_MODEL,
217
  contents=contents