Spaces:
Sleeping
Sleeping
Update myagent.py
Browse files- myagent.py +2 -2
myagent.py
CHANGED
@@ -10,7 +10,7 @@ import torch
|
|
10 |
# --- Basic Agent Definition ---
|
11 |
|
12 |
# Basic model wrapper for local inference with debug info
|
13 |
-
class
|
14 |
def __init__(self, model, tokenizer):
|
15 |
self.model = model
|
16 |
self.tokenizer = tokenizer
|
@@ -74,7 +74,7 @@ def load_model(model_id="LiquidAI/LFM2-1.2B"):
|
|
74 |
trust_remote_code=True,
|
75 |
)
|
76 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
77 |
-
return
|
78 |
|
79 |
# Run minimal test
|
80 |
if __name__ == "__main__":
|
|
|
10 |
# --- Basic Agent Definition ---
|
11 |
|
12 |
# Basic model wrapper for local inference with debug info
|
13 |
+
class BasicAgent:
|
14 |
def __init__(self, model, tokenizer):
|
15 |
self.model = model
|
16 |
self.tokenizer = tokenizer
|
|
|
74 |
trust_remote_code=True,
|
75 |
)
|
76 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
77 |
+
return BasicAgent(model, tokenizer)
|
78 |
|
79 |
# Run minimal test
|
80 |
if __name__ == "__main__":
|