Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ model.eval()
|
|
| 16 |
|
| 17 |
|
| 18 |
def run_detector(input_text):
|
| 19 |
-
Encode the input text and generate a response with specified generation parameters
|
| 20 |
input_ids = tokenizer(input_text,return_tensors="pt").input_ids.to(device)
|
| 21 |
output_ids = model.generate(input_ids, max_length=512, num_return_sequences=1, no_repeat_ngram_size=2, top_k=50, top_p=0.95, do_sample=True)
|
| 22 |
# Decode and print the generated output text
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
def run_detector(input_text):
|
| 19 |
+
# Encode the input text and generate a response with specified generation parameters
|
| 20 |
input_ids = tokenizer(input_text,return_tensors="pt").input_ids.to(device)
|
| 21 |
output_ids = model.generate(input_ids, max_length=512, num_return_sequences=1, no_repeat_ngram_size=2, top_k=50, top_p=0.95, do_sample=True)
|
| 22 |
# Decode and print the generated output text
|