First commit.

This commit is contained in:
2025-11-18 11:02:39 +01:00
parent e57266f93d
commit d4c4ccfc18
16 changed files with 874 additions and 1 deletions

41
python/controller.py Normal file
View File

@@ -0,0 +1,41 @@
import time
from baseController import BaseController
class Controller(BaseController):
model = None
tokenizer = None
counter = 0
def getModelPath(self, params):
return {"Model": self.model}
def getTokenizer(self, params):
return {"Tokenizer": self.tokenizer}
def increment(self, params):
self.counter += params.get("by", 1)
return {"counter": self.counter}
def reset(self, params):
self.counter = 0
return {"counter": self.counter}
def testStream(self, params):
for i in range(5):
time.sleep(0.5)
self.send({"partial": f"step {i+1} complete"})
return {"counter": self.counter}