Spaces:
Runtime error
Runtime error
ChinmoyDutta
commited on
Commit
•
f7ccbf5
1
Parent(s):
02f4e2b
Update utils/processimage.py
Browse files- utils/processimage.py +2 -1
utils/processimage.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import os
|
2 |
import uuid
|
|
|
3 |
import base64
|
4 |
import numpy as np
|
5 |
from PIL import Image
|
@@ -25,7 +26,7 @@ from dotenv import load_dotenv
|
|
25 |
token = os.environ.get("HF_TOKEN1")
|
26 |
|
27 |
# ........................................................................................................
|
28 |
-
|
29 |
def run_GOT(image, got_mode, fine_grained_mode="", ocr_color="", ocr_box=""):
|
30 |
unique_id = str(uuid.uuid4())
|
31 |
image_path = os.path.join(UPLOAD_FOLDER, f"{unique_id}.png")
|
|
|
1 |
import os
|
2 |
import uuid
|
3 |
+
import spaces
|
4 |
import base64
|
5 |
import numpy as np
|
6 |
from PIL import Image
|
|
|
26 |
token = os.environ.get("HF_TOKEN1")
|
27 |
|
28 |
# ........................................................................................................
|
29 |
+
@spaces.GPU
|
30 |
def run_GOT(image, got_mode, fine_grained_mode="", ocr_color="", ocr_box=""):
|
31 |
unique_id = str(uuid.uuid4())
|
32 |
image_path = os.path.join(UPLOAD_FOLDER, f"{unique_id}.png")
|