dawid-lorek commited on
Commit
893a971
·
verified ·
1 Parent(s): 9f06b73

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +5 -3
agent.py CHANGED
@@ -87,7 +87,7 @@ def answer_question(question: str, task_id: str = None) -> str:
87
  yt = get_youtube_transcript(question)
88
  file_context += f"\n[YouTube Transcript] {yt}"
89
  elif "* on the set" in question and file_context:
90
- # Parse table to extract non-commutative elements
91
  import re
92
  import pandas as pd
93
 
@@ -106,6 +106,8 @@ def answer_question(question: str, task_id: str = None) -> str:
106
  non_comm.add(a)
107
  non_comm.add(b)
108
  result = ", ".join(sorted(non_comm))
109
- file_context += f"\n[Parsed Non-Commutative Set] {result}"
 
110
  except Exception as e:
111
- file_context += f"\n[Table Parse Error] {e}"
 
 
87
  yt = get_youtube_transcript(question)
88
  file_context += f"\n[YouTube Transcript] {yt}"
89
  elif "* on the set" in question and file_context:
90
+ # Parse table to extract non-commutative elements
91
  import re
92
  import pandas as pd
93
 
 
106
  non_comm.add(a)
107
  non_comm.add(b)
108
  result = ", ".join(sorted(non_comm))
109
+ file_context += f"
110
+ [Parsed Non-Commutative Set] {result}"
111
  except Exception as e:
112
+ file_context += f"
113
+ [Table Parse Error] {e}"