Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,6 +15,7 @@ if torch.cuda.is_available():
|
|
| 15 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 17 |
|
|
|
|
| 18 |
def generate(
|
| 19 |
message: str,
|
| 20 |
chat_history: list[tuple[str, str]],
|
|
|
|
| 15 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 17 |
|
| 18 |
+
@spaces.GPU
|
| 19 |
def generate(
|
| 20 |
message: str,
|
| 21 |
chat_history: list[tuple[str, str]],
|