Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,8 @@ import torch
|
|
| 8 |
from huggingface_hub import InferenceClient
|
| 9 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
| 10 |
|
| 11 |
-
MAX_MAX_NEW_TOKENS =
|
| 12 |
-
DEFAULT_MAX_NEW_TOKENS =
|
| 13 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 14 |
|
| 15 |
#Transformers Code
|
|
@@ -52,7 +52,7 @@ def generate(
|
|
| 52 |
do_sample=True,
|
| 53 |
top_p=1.0,
|
| 54 |
top_k=50,
|
| 55 |
-
temperature=
|
| 56 |
num_beams=1,
|
| 57 |
repetition_penalty=1.1,
|
| 58 |
)
|
|
|
|
| 8 |
from huggingface_hub import InferenceClient
|
| 9 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
| 10 |
|
| 11 |
+
MAX_MAX_NEW_TOKENS = 1024
|
| 12 |
+
DEFAULT_MAX_NEW_TOKENS = 1024
|
| 13 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 14 |
|
| 15 |
#Transformers Code
|
|
|
|
| 52 |
do_sample=True,
|
| 53 |
top_p=1.0,
|
| 54 |
top_k=50,
|
| 55 |
+
temperature=0.9,
|
| 56 |
num_beams=1,
|
| 57 |
repetition_penalty=1.1,
|
| 58 |
)
|