Spaces:
Running
Running
ayan4m1
commited on
Commit
·
97b4c79
1
Parent(s):
546bdb2
fix: return a chat object
Browse files
app.py
CHANGED
@@ -12,14 +12,19 @@ def respond(
|
|
12 |
top_p: float,
|
13 |
top_k: int
|
14 |
):
|
15 |
-
yield [
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
|
25 |
"""
|
|
|
12 |
top_p: float,
|
13 |
top_k: int
|
14 |
):
|
15 |
+
yield [
|
16 |
+
{
|
17 |
+
"role": "assistant",
|
18 |
+
"content": pipe(
|
19 |
+
message,
|
20 |
+
max_new_tokens=max_new_tokens,
|
21 |
+
do_sample=True,
|
22 |
+
temperature=temperature,
|
23 |
+
top_p=top_p,
|
24 |
+
top_k=top_k
|
25 |
+
)['generated_text']
|
26 |
+
}
|
27 |
+
]
|
28 |
|
29 |
|
30 |
"""
|