Monster commited on
Commit
a66cb95
1 Parent(s): 03153fa

Max tokens 512

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -36,17 +36,9 @@ theme = gr.themes.Monochrome(
36
 
37
 
38
 
39
- # def generate(instruction):
40
- # response = llm(ins.format(instruction))
41
- # response = response['choices'][0]['text']
42
- # result = ""
43
- # for word in response.split(" "):
44
- # result += word + " "
45
- # yield result
46
-
47
  def generate(instruction):
48
  result = ""
49
- for x in llm(ins.format(instruction), stop=['USER:'], stream=True):
50
  result += x['choices'][0]['text']
51
  yield result
52
 
 
36
 
37
 
38
 
 
 
 
 
 
 
 
 
39
  def generate(instruction):
40
  result = ""
41
+ for x in llm(ins.format(instruction), stop=['USER:'], stream=True, max_tokens=512):
42
  result += x['choices'][0]['text']
43
  yield result
44