bstraehle commited on
Commit
f863813
·
verified ·
1 Parent(s): 7914072

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +5 -6
crew.py CHANGED
@@ -193,15 +193,14 @@ def run_crew(question, file_path):
193
  Raises:
194
  RuntimeError: If processing fails"""
195
  try:
 
 
 
 
 
196
  print("###")
197
  print(question)
198
- print(file_path)
199
  print("###")
200
-
201
- #if file_path:
202
- #df = read_file(file_path)
203
- #question = question.split(" File path:")[0]
204
- #question = f"Question: {question}\nFile data:\n{df.to_string()}"
205
 
206
  client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
207
 
 
193
  Raises:
194
  RuntimeError: If processing fails"""
195
  try:
196
+ if file_path:
197
+ df = read_file(file_path)
198
+ question = question.split(" File path:")[0]
199
+ question = f"File data:\n{df.to_string()\nQuestion: {question}}"
200
+
201
  print("###")
202
  print(question)
 
203
  print("###")
 
 
 
 
 
204
 
205
  client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
206