Fraser commited on
Commit
99a324c
·
1 Parent(s): 7aec64e

limit zero gpu time

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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],