Update handler.py
Browse files- handler.py +7 -1
handler.py
CHANGED
@@ -18,7 +18,13 @@ rather than the custom audio generation handler you've defined.
|
|
18 |
|
19 |
Create a `handler.py` file with your custom handler code:
|
20 |
"""
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
def __init__(self, path=""):
|
23 |
|
24 |
# Load the models and tokenizer
|
|
|
18 |
|
19 |
Create a `handler.py` file with your custom handler code:
|
20 |
"""
|
21 |
+
|
22 |
+
import torch
|
23 |
+
import numpy as np
|
24 |
+
|
25 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
26 |
+
|
27 |
+
class EndpointHandler():
|
28 |
def __init__(self, path=""):
|
29 |
|
30 |
# Load the models and tokenizer
|