Abinaya commited on
Commit
2f2e826
1 Parent(s): ba4ba04

code added

Browse files

You can use the model to detect events from any news data as

```

from peft import PeftModel

from transformers import AutoModelForCausalLM

import torch

model = AutoModelForCausalLM.from_pretrained("microsoft/phi-1_5", trust_remote_code=True, torch_dtype=torch.float32)

peft_model = PeftModel.from_pretrained(model, "Abinaya/phi-1_5-finetuned-news-events", from_transformers=True)

model = peft_model.merge_and_unload()

model
```

Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -8,4 +8,5 @@ metrics:
8
  - accuracy
9
  library_name: adapter-transformers
10
  pipeline_tag: text-generation
11
- ---
 
 
8
  - accuracy
9
  library_name: adapter-transformers
10
  pipeline_tag: text-generation
11
+ ---
12
+