Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,11 @@ from PIL import Image
|
|
5 |
import torch
|
6 |
import spaces
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
# Create dummy tensor to confirm GPU availability
|
9 |
zero = torch.Tensor([0]).cuda()
|
10 |
print("Torch is using:", zero.device) # Should be 'cuda:0'
|
|
|
5 |
import torch
|
6 |
import spaces
|
7 |
|
8 |
+
load_dotenv() # load .env file
|
9 |
+
|
10 |
+
HF_TOKEN = os.getenv("ocr_sec")
|
11 |
+
client = Client("theoracle/easyocr-api", hf_token=HF_TOKEN)
|
12 |
+
|
13 |
# Create dummy tensor to confirm GPU availability
|
14 |
zero = torch.Tensor([0]).cuda()
|
15 |
print("Torch is using:", zero.device) # Should be 'cuda:0'
|