SergeyO7 commited on
Commit
e8212c8
·
verified ·
1 Parent(s): 8888550

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -55,7 +55,8 @@ async def check_n_load_attach(session: aiohttp.ClientSession, task_id: str, ques
55
  print(f"Error downloading attachment for task {task_id}: {str(e)}")
56
  return None
57
 
58
- async def determine_extension(content_type: str, content: bytes, question: str) -> Optional[str]:
 
59
  # Check if the question mentions Excel
60
  if "excel" in question.lower():
61
  # Check for XLS signature
@@ -211,13 +212,13 @@ async def run_and_submit_all(profile: gr.OAuthProfile | None):
211
 
212
 
213
  #select question we want to focus
214
- # if "excel" in question_text.lower() or "mp3" in question_text.lower() or "chess" in question_text.lower():
215
  file_path = await check_n_load_attach(session, task_id, question_text.lower())
216
  result = await process_question(agent, question_text, task_id, file_path, results_log)
217
  if result:
218
  answers_payload.append(result)
219
- # else:
220
- # print("Skipping unrelated question.")
221
 
222
  if not answers_payload:
223
  print("Agent did not produce any answers to submit.")
 
55
  print(f"Error downloading attachment for task {task_id}: {str(e)}")
56
  return None
57
 
58
+ async def determine_extension(content_type: str, content: bytes, question
59
+ : str) -> Optional[str]:
60
  # Check if the question mentions Excel
61
  if "excel" in question.lower():
62
  # Check for XLS signature
 
212
 
213
 
214
  #select question we want to focus
215
+ if "excel" in question_text.lower() or "mp3" in question_text.lower() or "pitchers" in question_text.lower():
216
  file_path = await check_n_load_attach(session, task_id, question_text.lower())
217
  result = await process_question(agent, question_text, task_id, file_path, results_log)
218
  if result:
219
  answers_payload.append(result)
220
+ else:
221
+ print("Skipping unrelated question.")
222
 
223
  if not answers_payload:
224
  print("Agent did not produce any answers to submit.")