Monster commited on
Commit
ec2f6c7
1 Parent(s): 6571183

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -44,7 +44,11 @@ def generate(
44
  top_p=0.75,
45
  top_k=40,):
46
  result = ""
47
- for x in llm(ins.format(instruction), stop=['### Instruction:', '### End'], stream=True, temperature=temperature, top_p=top_p, top_k=top_k):
 
 
 
 
48
  result += x['choices'][0]['text']
49
  yield result
50
 
 
44
  top_p=0.75,
45
  top_k=40,):
46
  result = ""
47
+ if input:
48
+ ins_inp(instruction, input)
49
+ else:
50
+ ins.format(instruction)
51
+ for x in llm(instruction, stop=['### Instruction:', '### End'], stream=True, temperature=temperature, top_p=top_p, top_k=top_k):
52
  result += x['choices'][0]['text']
53
  yield result
54