Spaces:
Sleeping
Sleeping
Commit
·
584bbf9
1
Parent(s):
b5d4499
Allow early stopping for end sequences
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from happytransformer import HappyGeneration
|
|
5 |
happy_gen = HappyGeneration("GPT-NEO", "DarwinAnim8or/GPT-DMV-125m")
|
6 |
|
7 |
from happytransformer import GENSettings
|
8 |
-
args_top_k = GENSettings(no_repeat_ngram_size=3, do_sample=True,top_k=80, temperature=0.6, max_length=60, early_stopping=
|
9 |
|
10 |
def generate(text):
|
11 |
inputText = "PLATE: " + text + "\nREVIEW REASON CODE: "
|
|
|
5 |
happy_gen = HappyGeneration("GPT-NEO", "DarwinAnim8or/GPT-DMV-125m")
|
6 |
|
7 |
from happytransformer import GENSettings
|
8 |
+
args_top_k = GENSettings(no_repeat_ngram_size=3, do_sample=True,top_k=80, temperature=0.6, max_length=60, early_stopping=True)
|
9 |
|
10 |
def generate(text):
|
11 |
inputText = "PLATE: " + text + "\nREVIEW REASON CODE: "
|