Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def humanize_text(text):
|
|
43 |
input_ids = st.session_state.tokenizer(
|
44 |
prompt,
|
45 |
return_tensors="pt",
|
46 |
-
max_length=
|
47 |
truncation=True
|
48 |
).input_ids
|
49 |
|
@@ -53,7 +53,7 @@ def humanize_text(text):
|
|
53 |
max_length=1024, # 512
|
54 |
min_length=len(text.split()), # min_length=min_length,
|
55 |
do_sample=True,
|
56 |
-
temperature=0.
|
57 |
top_p=0.95, # Ajustado para melhor seleção de palavras
|
58 |
num_beams=3, # Reduzido para maior velocidade
|
59 |
repetition_penalty=1.2,
|
|
|
43 |
input_ids = st.session_state.tokenizer(
|
44 |
prompt,
|
45 |
return_tensors="pt",
|
46 |
+
max_length=1024,
|
47 |
truncation=True
|
48 |
).input_ids
|
49 |
|
|
|
53 |
max_length=1024, # 512
|
54 |
min_length=len(text.split()), # min_length=min_length,
|
55 |
do_sample=True,
|
56 |
+
temperature=0.1, # Reduzido para maior coerência
|
57 |
top_p=0.95, # Ajustado para melhor seleção de palavras
|
58 |
num_beams=3, # Reduzido para maior velocidade
|
59 |
repetition_penalty=1.2,
|