Update README.md
Browse files
README.md
CHANGED
@@ -59,7 +59,7 @@ text_encoder = AutoModel.from_pretrained("hustcw/clap-text", trust_remote_code=T
|
|
59 |
|
60 |
```python
|
61 |
with open("./CaseStudy/bubblesort.json") as fp:
|
62 |
-
asm = json.load(fp)
|
63 |
```
|
64 |
|
65 |
2. Define your classification prompts:
|
@@ -88,7 +88,7 @@ preds = torch.softmax(logits / 0.07, dim=1).squeeze(0).tolist()
|
|
88 |
|
89 |
# Output predictions
|
90 |
for i, prompt in enumerate(prompts):
|
91 |
-
|
92 |
```
|
93 |
|
94 |
Repeat the process for any other classification tasks you want, such as malware classification and cryptographic algorithm identification, by loading the respective datasets and defining the relevant natural language prompts.
|
|
|
59 |
|
60 |
```python
|
61 |
with open("./CaseStudy/bubblesort.json") as fp:
|
62 |
+
asm = json.load(fp)
|
63 |
```
|
64 |
|
65 |
2. Define your classification prompts:
|
|
|
88 |
|
89 |
# Output predictions
|
90 |
for i, prompt in enumerate(prompts):
|
91 |
+
print(f"Probability: {preds[i]*100:.3f}%, Text: {prompt}")
|
92 |
```
|
93 |
|
94 |
Repeat the process for any other classification tasks you want, such as malware classification and cryptographic algorithm identification, by loading the respective datasets and defining the relevant natural language prompts.
|