Spaces:
Running
Running
雷娃
commited on
Commit
·
2c010ad
1
Parent(s):
29f6a41
add interactive mode
Browse files
app.py
CHANGED
@@ -39,7 +39,8 @@ def chat(user_input, max_new_tokens=512):
|
|
39 |
generated_text = ""
|
40 |
for new_text in streamer:
|
41 |
generated_text += new_text
|
42 |
-
yield generated_text
|
|
|
43 |
|
44 |
thread.join()
|
45 |
|
|
|
39 |
generated_text = ""
|
40 |
for new_text in streamer:
|
41 |
generated_text += new_text
|
42 |
+
yield generated_text
|
43 |
+
#yield generated_text[prompt_len:]
|
44 |
|
45 |
thread.join()
|
46 |
|