Commit
·
ef8d70b
1
Parent(s):
b8aad58
lllll
Browse files- handler.py +6 -5
handler.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
-
# handler.py
|
| 2 |
-
|
| 3 |
from inference import Chat
|
| 4 |
-
chat = Chat()
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from inference import Chat
|
|
|
|
| 2 |
|
| 3 |
+
class EndpointHandler:
|
| 4 |
+
def __init__(self, path="."):
|
| 5 |
+
self.chat = Chat()
|
| 6 |
+
|
| 7 |
+
def __call__(self, inputs):
|
| 8 |
+
return {"output": self.chat.answer(inputs)}
|