Spaces:
Runtime error
Runtime error
Update src/demo.py
Browse files- src/demo.py +8 -9
src/demo.py
CHANGED
|
@@ -13,18 +13,17 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
| 13 |
TOKEN = os.environ.get("HF_TOKEN", None)
|
| 14 |
|
| 15 |
|
| 16 |
-
model_id = "meta-llama/Llama-2-7b-chat-hf"
|
| 17 |
-
# tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 18 |
-
# model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 19 |
-
|
| 20 |
-
|
| 21 |
type2dataset = {
|
| 22 |
-
"re2text-easy": load_dataset('3B-Group/ConvRe', "en-re2text", token=
|
| 23 |
-
"re2text-hard": load_dataset('3B-Group/ConvRe', "en-re2text", token=
|
| 24 |
-
"text2re-easy": load_dataset('3B-Group/ConvRe', "en-text2re", token=
|
| 25 |
-
"text2re-hard": load_dataset('3B-Group/ConvRe', "en-text2re", token=
|
| 26 |
}
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
# type2dataset = {}
|
| 29 |
|
| 30 |
|
|
|
|
| 13 |
TOKEN = os.environ.get("HF_TOKEN", None)
|
| 14 |
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
type2dataset = {
|
| 17 |
+
"re2text-easy": load_dataset('3B-Group/ConvRe', "en-re2text", token=TOKEN, split="prompt1"),
|
| 18 |
+
"re2text-hard": load_dataset('3B-Group/ConvRe', "en-re2text", token=TOKEN, split="prompt4"),
|
| 19 |
+
"text2re-easy": load_dataset('3B-Group/ConvRe', "en-text2re", token=TOKEN, split="prompt1"),
|
| 20 |
+
"text2re-hard": load_dataset('3B-Group/ConvRe', "en-text2re", token=TOKEN, split="prompt3")
|
| 21 |
}
|
| 22 |
|
| 23 |
+
model_id = "meta-llama/Llama-2-7b-chat-hf"
|
| 24 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 25 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 26 |
+
|
| 27 |
# type2dataset = {}
|
| 28 |
|
| 29 |
|