Spaces:
Runtime error
Runtime error
Update app.py (#1)
Browse files- Update app.py (94e75d091fd07377e815a4164bc692448f21f6d1)
Co-authored-by: raphael g <raphael-gl@users.noreply.huggingface.co>
app.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
import re
|
| 2 |
from typing import Tuple, Optional
|
| 3 |
|
|
@@ -204,6 +206,7 @@ def create_localized_image(original_image: Image.Image, coordinates: list[dict])
|
|
| 204 |
|
| 205 |
|
| 206 |
# --- Gradio processing function ---
|
|
|
|
| 207 |
def navigate(input_numpy_image: np.ndarray, task: str) -> Tuple[str, Optional[Image.Image]]:
|
| 208 |
input_pil_image = array_to_image(input_numpy_image)
|
| 209 |
assert isinstance(input_pil_image, Image.Image)
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
+
|
| 3 |
import re
|
| 4 |
from typing import Tuple, Optional
|
| 5 |
|
|
|
|
| 206 |
|
| 207 |
|
| 208 |
# --- Gradio processing function ---
|
| 209 |
+
@spaces.GPU
|
| 210 |
def navigate(input_numpy_image: np.ndarray, task: str) -> Tuple[str, Optional[Image.Image]]:
|
| 211 |
input_pil_image = array_to_image(input_numpy_image)
|
| 212 |
assert isinstance(input_pil_image, Image.Image)
|