Spaces:
Sleeping
Sleeping
change model
Browse files
app.py
CHANGED
|
@@ -49,12 +49,16 @@ final_answer = FinalAnswerTool()
|
|
| 49 |
#)
|
| 50 |
class DummyModel:
|
| 51 |
def __init__(self):
|
| 52 |
-
self.last_input_token_count = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
def run(self, prompt: str):
|
| 55 |
-
# Simule une réponse d'agent bien formée
|
| 56 |
return {
|
| 57 |
-
"text": """Thought:
|
| 58 |
Final Answer: 6.4"""
|
| 59 |
}
|
| 60 |
model = DummyModel()
|
|
|
|
| 49 |
#)
|
| 50 |
class DummyModel:
|
| 51 |
def __init__(self):
|
| 52 |
+
self.last_input_token_count = 0
|
| 53 |
+
self.last_output_token_count = 0
|
| 54 |
+
|
| 55 |
+
def __call__(self, prompt: str):
|
| 56 |
+
# Simule une sortie d'agent bien structurée
|
| 57 |
+
self.last_input_token_count = len(prompt.split()) # juste pour simuler
|
| 58 |
+
self.last_output_token_count = 12 # nombre fictif
|
| 59 |
|
|
|
|
|
|
|
| 60 |
return {
|
| 61 |
+
"text": """Thought: I now know the final answer.
|
| 62 |
Final Answer: 6.4"""
|
| 63 |
}
|
| 64 |
model = DummyModel()
|