omkar56 commited on
Commit
8fa65f5
1 Parent(s): b5fa0bf

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -8
main.py CHANGED
@@ -40,16 +40,16 @@ def generate_text(request: Request, prompt: str = Body()):
40
  repetition_penalty=repetition_penalty,
41
  do_sample=True,
42
  seed=random.randint(0, 10**7),
43
- stream=True,
44
  details=True,
45
- return_full_text=False
46
  )
47
- output = ""
48
 
49
- for response in stream:
50
- output += response.token.text
51
- yield output
52
 
53
- return output[len(output) - 1]
54
 
55
- # return stream
 
40
  repetition_penalty=repetition_penalty,
41
  do_sample=True,
42
  seed=random.randint(0, 10**7),
43
+ stream=False,
44
  details=True,
45
+ return_full_text=True
46
  )
47
+ # output = ""
48
 
49
+ # for response in stream:
50
+ # output += response.token.text
51
+ # yield output
52
 
53
+ # return output[len(output) - 1]
54
 
55
+ return stream