bstraehle commited on
Commit
3bb9ffc
·
verified ·
1 Parent(s): 1a555c0

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +5 -3
crew.py CHANGED
@@ -193,9 +193,9 @@ def run_crew(question, file_path):
193
  Raises:
194
  RuntimeError: If processing fails"""
195
  try:
196
- if file_path:
197
- df = read_file(file_path)
198
- question = f"Content of file {file_path}:\n{df.to_string()}\nQuestion: {question}\nDO NOT READ the file, but use the content provided above."
199
 
200
  print("###")
201
  print(question)
@@ -367,6 +367,8 @@ def run_crew(question, file_path):
367
 
368
  if file_path:
369
  question = f"{question} File path: {file_path}."
 
 
370
 
371
  initial_answer = crew.kickoff(inputs={"question": question})
372
  final_answer = get_final_answer(FINAL_ANSWER_MODEL, question, str(initial_answer))
 
193
  Raises:
194
  RuntimeError: If processing fails"""
195
  try:
196
+ #if file_path:
197
+ # df = read_file(file_path)
198
+ # question = f"Content of file {file_path}:\n{df.to_string()}\nQuestion: {question}\nDO NOT READ the file, but use the content provided above."
199
 
200
  print("###")
201
  print(question)
 
367
 
368
  if file_path:
369
  question = f"{question} File path: {file_path}."
370
+ #df = read_file(file_path)
371
+ #question = f"Content of file {file_path}:\n{df.to_string()}\nQuestion: {question}\nDO NOT READ the file, but use the content provided above."
372
 
373
  initial_answer = crew.kickoff(inputs={"question": question})
374
  final_answer = get_final_answer(FINAL_ANSWER_MODEL, question, str(initial_answer))