sebdg commited on
Commit
ed0f954
1 Parent(s): fc7cbfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -37,14 +37,17 @@ def respond(
37
  temperature = 0.7
38
  top_p = 0.95
39
 
40
- output = query({
 
41
  "inputs":system_message + "\n\n" + message,
42
  "parameters": {
43
  "max_new_tokens": 150
44
  }
45
- })
46
- return output
47
-
 
 
48
 
49
 
50
  """
 
37
  temperature = 0.7
38
  top_p = 0.95
39
 
40
+
41
+ for message in query({
42
  "inputs":system_message + "\n\n" + message,
43
  "parameters": {
44
  "max_new_tokens": 150
45
  }
46
+ }):
47
+ token = message.choices[0].delta.content
48
+ response += token
49
+ yield response
50
+
51
 
52
 
53
  """