Spaces:
Runtime error
Runtime error
Commit
·
87d3353
1
Parent(s):
3052a7f
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ def respond(
|
|
104 |
output_scores=True,
|
105 |
max_new_tokens=max_new_tokens,
|
106 |
)
|
107 |
-
response = tokenizer.decode(generation_output[0][:-
|
108 |
return response
|
109 |
|
110 |
|
@@ -119,7 +119,7 @@ g = gr.Interface(
|
|
119 |
gr.components.Slider(minimum=0, maximum=100, step=1, value=40, label="Top k"),
|
120 |
gr.components.Slider(minimum=1, maximum=4, step=1, value=4, label="Beams"),
|
121 |
gr.components.Slider(
|
122 |
-
minimum=1, maximum=768, step=1, value=
|
123 |
),
|
124 |
],
|
125 |
outputs=[
|
|
|
104 |
output_scores=True,
|
105 |
max_new_tokens=max_new_tokens,
|
106 |
)
|
107 |
+
response = tokenizer.decode(generation_output.sequences[0][:-1]).split("### Assistant:\n", 1)[1]
|
108 |
return response
|
109 |
|
110 |
|
|
|
119 |
gr.components.Slider(minimum=0, maximum=100, step=1, value=40, label="Top k"),
|
120 |
gr.components.Slider(minimum=1, maximum=4, step=1, value=4, label="Beams"),
|
121 |
gr.components.Slider(
|
122 |
+
minimum=1, maximum=768, step=1, value=512, label="Max tokens"
|
123 |
),
|
124 |
],
|
125 |
outputs=[
|