Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
•
a1fddf9
1
Parent(s):
47c8870
update
Browse files- utils/model.py +3 -1
utils/model.py
CHANGED
@@ -2,7 +2,7 @@ from transformers import AutoTokenizer
|
|
2 |
import transformers
|
3 |
import torch
|
4 |
|
5 |
-
class Model():
|
6 |
number_of_models = 0
|
7 |
__model_list__ = [
|
8 |
"lmsys/vicuna-7b-v1.5",
|
@@ -10,6 +10,8 @@ class Model():
|
|
10 |
]
|
11 |
|
12 |
def __init__(self, model_name="lmsys/vicuna-7b-v1.5") -> None:
|
|
|
|
|
13 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
|
14 |
self.name = model_name
|
15 |
self.pipeline = transformers.pipeline(
|
|
|
2 |
import transformers
|
3 |
import torch
|
4 |
|
5 |
+
class Model(torch.nn.Module):
|
6 |
number_of_models = 0
|
7 |
__model_list__ = [
|
8 |
"lmsys/vicuna-7b-v1.5",
|
|
|
10 |
]
|
11 |
|
12 |
def __init__(self, model_name="lmsys/vicuna-7b-v1.5") -> None:
|
13 |
+
super(Model, self).__init__()
|
14 |
+
|
15 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
|
16 |
self.name = model_name
|
17 |
self.pipeline = transformers.pipeline(
|