limit zero gpu time
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ if torch.cuda.is_available():
|
|
24 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
25 |
|
26 |
|
27 |
-
@spaces.GPU
|
28 |
def generate(
|
29 |
message: str,
|
30 |
chat_history: list[dict],
|
|
|
24 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
25 |
|
26 |
|
27 |
+
@spaces.GPU(duration=120) # Limit GPU session to 2 minutes
|
28 |
def generate(
|
29 |
message: str,
|
30 |
chat_history: list[dict],
|