bstraehle commited on
Commit
dc66c10
·
verified ·
1 Parent(s): 04f335f

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +2 -3
crew.py CHANGED
@@ -357,10 +357,9 @@ def run_crew(question, file_path):
357
  # Process
358
 
359
  if file_path:
360
- ext = os.path.splitext(file_path)[1].lower()
361
 
362
- if ext in (".csv", ".xls", ".xlsx", ".json", ".jsonl"):
363
- df = read_file(file_path)
364
  question = f"{question} File {file_path} data: {df.to_string()}"
365
  else:
366
  question = f"{question} File path: {file_path}."
 
357
  # Process
358
 
359
  if file_path:
360
+ df = read_file(file_path)
361
 
362
+ if df:
 
363
  question = f"{question} File {file_path} data: {df.to_string()}"
364
  else:
365
  question = f"{question} File path: {file_path}."