Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
·
2e59878
1
Parent(s):
06b31f0
Update buff for stream output
Browse files
app.py
CHANGED
@@ -31,6 +31,7 @@ def predict0(prompt, bot):
|
|
31 |
for word in generator:
|
32 |
print(word, end="", flush=True)
|
33 |
response += word
|
|
|
34 |
print("")
|
35 |
logger.debug(f"{response=}")
|
36 |
except Exception as exc:
|
@@ -269,7 +270,7 @@ with gr.Blocks(
|
|
269 |
) as block:
|
270 |
with gr.Accordion("🎈 Info", open=False):
|
271 |
gr.HTML(
|
272 |
-
|
273 |
)
|
274 |
gr.Markdown(
|
275 |
"""<h4><center>mpt-30b-ggml-chat</center></h4>
|
@@ -282,6 +283,7 @@ with gr.Blocks(
|
|
282 |
)
|
283 |
conversation = Chat()
|
284 |
chatbot = gr.Chatbot().style(height=700) # 500
|
|
|
285 |
with gr.Row():
|
286 |
with gr.Column():
|
287 |
msg = gr.Textbox(
|
|
|
31 |
for word in generator:
|
32 |
print(word, end="", flush=True)
|
33 |
response += word
|
34 |
+
buff.value = response
|
35 |
print("")
|
36 |
logger.debug(f"{response=}")
|
37 |
except Exception as exc:
|
|
|
270 |
) as block:
|
271 |
with gr.Accordion("🎈 Info", open=False):
|
272 |
gr.HTML(
|
273 |
+
"""<center><a href="https://huggingface.co/spaces/mikeee/mpt-30b-chat?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate"></a> and spin a CPU UPGRADE to avoid the queue</center>"""
|
274 |
)
|
275 |
gr.Markdown(
|
276 |
"""<h4><center>mpt-30b-ggml-chat</center></h4>
|
|
|
283 |
)
|
284 |
conversation = Chat()
|
285 |
chatbot = gr.Chatbot().style(height=700) # 500
|
286 |
+
buff = gr.Textbox()
|
287 |
with gr.Row():
|
288 |
with gr.Column():
|
289 |
msg = gr.Textbox(
|