Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -142,6 +142,7 @@ theme = gr.themes.Monochrome(
|
|
142 |
],
|
143 |
)
|
144 |
|
|
|
145 |
def stream(model, code, generate_kwargs):
|
146 |
input_ids = tokenizer(code, return_tensors="pt").to("cuda")
|
147 |
generated_ids = model.generate(**input_ids, **generate_kwargs)
|
|
|
142 |
],
|
143 |
)
|
144 |
|
145 |
+
@spaces.GPU
|
146 |
def stream(model, code, generate_kwargs):
|
147 |
input_ids = tokenizer(code, return_tensors="pt").to("cuda")
|
148 |
generated_ids = model.generate(**input_ids, **generate_kwargs)
|