Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,12 @@ def generate_code(prompt):
|
|
33 |
max_length = 1024,
|
34 |
min_new_tokens = 256,
|
35 |
#low_memory = True,
|
|
|
36 |
token_healing = True,
|
37 |
guidance_scale = 3.8,
|
38 |
)
|
39 |
generated_ids = [output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)]
|
40 |
-
|
41 |
return response
|
42 |
|
43 |
with gr.Blocks(title="Qwen 14b") as demo: # Updated title
|
|
|
33 |
max_length = 1024,
|
34 |
min_new_tokens = 256,
|
35 |
#low_memory = True,
|
36 |
+
do_sample = True,
|
37 |
token_healing = True,
|
38 |
guidance_scale = 3.8,
|
39 |
)
|
40 |
generated_ids = [output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)]
|
41 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
42 |
return response
|
43 |
|
44 |
with gr.Blocks(title="Qwen 14b") as demo: # Updated title
|