BenBranyon commited on
Commit
97b80a9
·
verified ·
1 Parent(s): 25e46b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 = 512
12
- DEFAULT_MAX_NEW_TOKENS = 512
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=1.0,
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
  )