bkoz commited on
Commit
49027e2
·
verified ·
1 Parent(s): 7520afc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,11 +4,13 @@ import torch
4
  from huggingface_hub import hf_hub_download
5
  from llama_cpp import Llama, LlamaGrammar
6
 
 
7
  zero = torch.Tensor([0]).cuda()
8
  print(zero.device) # <-- 'cpu' 🤔
9
 
10
  @spaces.GPU
11
- def greet(llm):
 
12
  print(zero.device) # <-- 'cuda:0' 🤗
13
  grammar = LlamaGrammar.from_string('''
14
  root ::= sentence
 
4
  from huggingface_hub import hf_hub_download
5
  from llama_cpp import Llama, LlamaGrammar
6
 
7
+
8
  zero = torch.Tensor([0]).cuda()
9
  print(zero.device) # <-- 'cpu' 🤔
10
 
11
  @spaces.GPU
12
+ def greet(n):
13
+ global llm
14
  print(zero.device) # <-- 'cuda:0' 🤗
15
  grammar = LlamaGrammar.from_string('''
16
  root ::= sentence