Spaces:
Configuration error
Configuration error
Update crew.py
Browse files
crew.py
CHANGED
|
@@ -168,10 +168,7 @@ def run_crew(question, file_path):
|
|
| 168 |
final_question = question
|
| 169 |
|
| 170 |
if file_path:
|
| 171 |
-
if is_ext(file_path, ".csv") or
|
| 172 |
-
is_ext(file_path, ".xls") or
|
| 173 |
-
is_ext(file_path, ".xlsx") or
|
| 174 |
-
is_ext(file_path, ".json") or is_ext(file_path, ".jsonl"):
|
| 175 |
json_data = read_file_json(file_path)
|
| 176 |
final_question = f"{question} JSON data:\n{json_data}."
|
| 177 |
else:
|
|
|
|
| 168 |
final_question = question
|
| 169 |
|
| 170 |
if file_path:
|
| 171 |
+
if is_ext(file_path, ".csv") or is_ext(file_path, ".xls") or is_ext(file_path, ".xlsx") or is_ext(file_path, ".json") or is_ext(file_path, ".jsonl"):
|
|
|
|
|
|
|
|
|
|
| 172 |
json_data = read_file_json(file_path)
|
| 173 |
final_question = f"{question} JSON data:\n{json_data}."
|
| 174 |
else:
|