Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,8 @@ model.eval()
|
|
13 |
model.to('cpu')
|
14 |
|
15 |
# Define the function that generates text from a prompt
|
16 |
-
def generate_text(prompt, temperature=0.1, top_p=0.2, max_tokens=
|
17 |
-
prompt_with_eos = prompt + " >" # Add the "EOS" to the end of the prompt
|
18 |
input_tokens = tokenizer.encode(prompt_with_eos, return_tensors='pt')
|
19 |
|
20 |
input_tokens = input_tokens.to('cpu')
|
|
|
13 |
model.to('cpu')
|
14 |
|
15 |
# Define the function that generates text from a prompt
|
16 |
+
def generate_text(prompt, temperature=0.1, top_p=0.2, max_tokens=3):
|
17 |
+
prompt_with_eos = prompt + " > " # Add the "EOS" to the end of the prompt
|
18 |
input_tokens = tokenizer.encode(prompt_with_eos, return_tensors='pt')
|
19 |
|
20 |
input_tokens = input_tokens.to('cpu')
|