Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,14 +37,17 @@ def respond(
|
|
37 |
temperature = 0.7
|
38 |
top_p = 0.95
|
39 |
|
40 |
-
|
|
|
41 |
"inputs":system_message + "\n\n" + message,
|
42 |
"parameters": {
|
43 |
"max_new_tokens": 150
|
44 |
}
|
45 |
-
})
|
46 |
-
|
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 |
"""
|