Datasets:
Tasks:
Text2Text Generation
Modalities:
Text
Formats:
json
Languages:
Indonesian
Size:
1M<n<10M
Tags:
code
License:
vendetta25
commited on
Upload 6 files
Browse files
pentesting_albert_model/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
# config.json
|
pentesting_albert_model/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:36ab182f19514feec9206b01edc35c88d6e1e405cdef49ce88378ed0469d4e55
|
3 |
+
size 20
|
pentesting_albert_model/special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
# special_tokens_map.json
|
pentesting_albert_model/tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
# tokenizer_config.json
|
pentesting_albert_model/vocab.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
# vocab.txt
|
pentesting_assistant.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline, AlbertTokenizer, AlbertForSequenceClassification
|
2 |
+
|
3 |
+
# Load model
|
4 |
+
model = AlbertForSequenceClassification.from_pretrained('./pentesting_albert_model')
|
5 |
+
tokenizer = AlbertTokenizer.from_pretrained('./pentesting_albert_model')
|
6 |
+
|
7 |
+
# Create text-generation pipeline
|
8 |
+
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
9 |
+
|
10 |
+
while True:
|
11 |
+
user_input = input("Kamu: ")
|
12 |
+
if user_input.lower() == "keluar":
|
13 |
+
break
|
14 |
+
|
15 |
+
# Generate response
|
16 |
+
response = generator(user_input, max_length=50, num_return_sequences=1, do_sample=True, top_k=50, top_p=0.95)
|
17 |
+
|
18 |
+
print("Asisten: ", response[0]['generated_text'])
|