Add inference handler for HF Endpoints
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -7,8 +7,8 @@ import base64
|
|
| 7 |
from peft import PeftModel
|
| 8 |
|
| 9 |
class EndpointHandler():
|
| 10 |
-
def __init__(self):
|
| 11 |
-
self.path =
|
| 12 |
# Load base model and tokenizer
|
| 13 |
base_model_id = "Qwen/Qwen2-VL-2B-Instruct"
|
| 14 |
|
|
|
|
| 7 |
from peft import PeftModel
|
| 8 |
|
| 9 |
class EndpointHandler():
|
| 10 |
+
def __init__(self, model_dir: str):
|
| 11 |
+
self.path = model_dir
|
| 12 |
# Load base model and tokenizer
|
| 13 |
base_model_id = "Qwen/Qwen2-VL-2B-Instruct"
|
| 14 |
|