moriire commited on
Commit
ac1d2a7
1 Parent(s): 52b60b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -103,19 +103,15 @@ async def generate(gen:GenModel):
103
  ],
104
  temperature = gen.temperature,
105
  seed= gen.seed,
106
- #stream=True
107
  )
108
- """
109
  for chunk in output:
110
-
111
  delta = chunk['choices'][0]['delta']
112
  if 'role' in delta:
113
  print(delta['role'], end=': ')
114
  elif 'content' in delta:
115
  print(delta['content'], end='')
116
-
117
  print(chunk)
118
- """
119
  et = time()
120
  output["time"] = et - st
121
  return output
 
103
  ],
104
  temperature = gen.temperature,
105
  seed= gen.seed,
106
+ stream=True
107
  )
 
108
  for chunk in output:
 
109
  delta = chunk['choices'][0]['delta']
110
  if 'role' in delta:
111
  print(delta['role'], end=': ')
112
  elif 'content' in delta:
113
  print(delta['content'], end='')
 
114
  print(chunk)
 
115
  et = time()
116
  output["time"] = et - st
117
  return output