Update crew.py
Browse files
crew.py
CHANGED
@@ -359,10 +359,10 @@ def run_crew(question, file_path):
|
|
359 |
if file_path:
|
360 |
df = read_file(file_path)
|
361 |
|
362 |
-
if df:
|
363 |
-
question = f"{question} File data: {df.to_string()}" # load data due to sandbox contraints
|
364 |
-
else:
|
365 |
question = f"{question} File path: {file_path}."
|
|
|
|
|
366 |
|
367 |
print("###")
|
368 |
print(question)
|
|
|
359 |
if file_path:
|
360 |
df = read_file(file_path)
|
361 |
|
362 |
+
if df.empty:
|
|
|
|
|
363 |
question = f"{question} File path: {file_path}."
|
364 |
+
else:
|
365 |
+
question = f"{question} File data: {df.to_string()}" # load data due to sandbox contraints
|
366 |
|
367 |
print("###")
|
368 |
print(question)
|