Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ model_path = "01-ai/Yi-Coder-9B-Chat"
|
|
| 20 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 21 |
model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto").eval()
|
| 22 |
|
| 23 |
-
@spaces.GPU(duration=
|
| 24 |
def generate_code(system_prompt, user_prompt, max_length):
|
| 25 |
messages = [
|
| 26 |
{"role": "system", "content": system_prompt},
|
|
|
|
| 20 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 21 |
model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto").eval()
|
| 22 |
|
| 23 |
+
@spaces.GPU(duration=190)
|
| 24 |
def generate_code(system_prompt, user_prompt, max_length):
|
| 25 |
messages = [
|
| 26 |
{"role": "system", "content": system_prompt},
|