rename pipe
Browse files- metadata_transformer.py +2 -2
metadata_transformer.py
CHANGED
|
@@ -14,14 +14,14 @@ def translate(schema_input, schema_target):
|
|
| 14 |
model = "meta-llama/Llama-2-7b-chat-hf"
|
| 15 |
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
| 17 |
-
|
| 18 |
"text-generation",
|
| 19 |
model=model,
|
| 20 |
torch_dtype=torch.float16,
|
| 21 |
device_map="auto",
|
| 22 |
)
|
| 23 |
|
| 24 |
-
sequences =
|
| 25 |
'{} \n Translate the schema metadata file above to the schema: {}'.format(schema_input, schema_target),
|
| 26 |
do_sample=True,
|
| 27 |
top_k=10,
|
|
|
|
| 14 |
model = "meta-llama/Llama-2-7b-chat-hf"
|
| 15 |
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
| 17 |
+
pipe = pipeline(
|
| 18 |
"text-generation",
|
| 19 |
model=model,
|
| 20 |
torch_dtype=torch.float16,
|
| 21 |
device_map="auto",
|
| 22 |
)
|
| 23 |
|
| 24 |
+
sequences = pipe(
|
| 25 |
'{} \n Translate the schema metadata file above to the schema: {}'.format(schema_input, schema_target),
|
| 26 |
do_sample=True,
|
| 27 |
top_k=10,
|