Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ def generate(
|
|
108 |
max_new_tokens=max_new_tokens,
|
109 |
top_p=top_p,
|
110 |
top_k=40,
|
111 |
-
|
112 |
do_sample=True,
|
113 |
truncate=1024,
|
114 |
# seed=42,
|
@@ -116,7 +116,7 @@ def generate(
|
|
116 |
stop_sequences=[DEFAULT_SEPARATOR]
|
117 |
)
|
118 |
|
119 |
-
print(prompt)
|
120 |
stream = CURRENT_CLIENT.generate_stream(
|
121 |
prompt,
|
122 |
**generate_kwargs,
|
@@ -175,7 +175,7 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
|
|
175 |
)
|
176 |
|
177 |
with gr.Row():
|
178 |
-
with gr.
|
179 |
output = gr.Markdown()
|
180 |
chatbot = gr.Chatbot(elem_id="chat-message", label="Chat")
|
181 |
|
@@ -291,4 +291,4 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
|
|
291 |
|
292 |
clear_chat_button.click(clear_chat, outputs=[chatbot, history])
|
293 |
|
294 |
-
demo.queue(
|
|
|
108 |
max_new_tokens=max_new_tokens,
|
109 |
top_p=top_p,
|
110 |
top_k=40,
|
111 |
+
repetition_penalty=repetition_penalty,
|
112 |
do_sample=True,
|
113 |
truncate=1024,
|
114 |
# seed=42,
|
|
|
116 |
stop_sequences=[DEFAULT_SEPARATOR]
|
117 |
)
|
118 |
|
119 |
+
# print(prompt)
|
120 |
stream = CURRENT_CLIENT.generate_stream(
|
121 |
prompt,
|
122 |
**generate_kwargs,
|
|
|
175 |
)
|
176 |
|
177 |
with gr.Row():
|
178 |
+
with gr.Group():
|
179 |
output = gr.Markdown()
|
180 |
chatbot = gr.Chatbot(elem_id="chat-message", label="Chat")
|
181 |
|
|
|
291 |
|
292 |
clear_chat_button.click(clear_chat, outputs=[chatbot, history])
|
293 |
|
294 |
+
demo.queue().launch()
|