Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
| 5 |
# Use a pipeline as a high-level helper
|
| 6 |
from transformers import pipeline
|
| 7 |
|
| 8 |
-
code_writer = pipeline("text-generation", model="Qwen/Qwen2.5-Coder-
|
| 9 |
|
| 10 |
# Define the code generation function
|
| 11 |
def generate_code(prompt, max_length):
|
|
|
|
| 5 |
# Use a pipeline as a high-level helper
|
| 6 |
from transformers import pipeline
|
| 7 |
|
| 8 |
+
code_writer = pipeline("text-generation", model="Qwen/Qwen2.5-Coder-7B-Instruct",torch_dtype=torch.bfloat16 )
|
| 9 |
|
| 10 |
# Define the code generation function
|
| 11 |
def generate_code(prompt, max_length):
|