Spaces:
Sleeping
Sleeping
Commit
•
e3e97c6
1
Parent(s):
bdc3d58
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def run(message, chat_history, system_prompt, max_new_tokens=1024, temperature=0
|
|
40 |
stream = client.generate_stream(prompt, **generate_kwargs)
|
41 |
output = ''
|
42 |
for response in stream:
|
43 |
-
if any([end_token in response.token.text for end_token in [EOS_STRING,
|
44 |
return output
|
45 |
else:
|
46 |
output += response.token.text
|
@@ -109,7 +109,7 @@ with gr.Blocks(theme='Taithrah/Minimal') as demo:
|
|
109 |
textbox = gr.Textbox(
|
110 |
container=False,
|
111 |
show_label=False,
|
112 |
-
placeholder='Hi,
|
113 |
scale=10
|
114 |
)
|
115 |
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|
|
|
40 |
stream = client.generate_stream(prompt, **generate_kwargs)
|
41 |
output = ''
|
42 |
for response in stream:
|
43 |
+
if any([end_token in response.token.text for end_token in [EOS_STRING, EOT_STRING]]):
|
44 |
return output
|
45 |
else:
|
46 |
output += response.token.text
|
|
|
109 |
textbox = gr.Textbox(
|
110 |
container=False,
|
111 |
show_label=False,
|
112 |
+
placeholder='Hi, Mistral',
|
113 |
scale=10
|
114 |
)
|
115 |
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|