Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -77,17 +77,17 @@ class BasicAgent:
|
|
77 |
def __call__(self, question: str) -> str:
|
78 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
79 |
|
80 |
-
if self.
|
81 |
-
print("Detected likely reversed text. Attempting riddle solving...")
|
82 |
-
return self.solve_riddle(question)
|
83 |
-
|
84 |
-
else if: self.is_chess_question(question):
|
85 |
print("Detected chess-related question. Attempting board extraction...")
|
86 |
# You would extract image info from the question or context here
|
87 |
# For now, we'll simulate board analysis
|
88 |
board = self.extract_board_from_image("") # Replace with actual image
|
89 |
return self.find_best_move(board)
|
90 |
|
|
|
|
|
|
|
|
|
91 |
final_answer = self.agent.run(question)
|
92 |
print(f"Agent returning final answer: {final_answer}")
|
93 |
return final_answer
|
|
|
77 |
def __call__(self, question: str) -> str:
|
78 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
79 |
|
80 |
+
if self.is_chess_question(question):
|
|
|
|
|
|
|
|
|
81 |
print("Detected chess-related question. Attempting board extraction...")
|
82 |
# You would extract image info from the question or context here
|
83 |
# For now, we'll simulate board analysis
|
84 |
board = self.extract_board_from_image("") # Replace with actual image
|
85 |
return self.find_best_move(board)
|
86 |
|
87 |
+
if self.maybe_reversed(question):
|
88 |
+
print("Detected likely reversed text. Attempting riddle solving...")
|
89 |
+
return self.solve_riddle(question)
|
90 |
+
|
91 |
final_answer = self.agent.run(question)
|
92 |
print(f"Agent returning final answer: {final_answer}")
|
93 |
return final_answer
|