Commit ·
6a145c0
1
Parent(s): 8a21f35
Fix Gradio Pydantic Bug by removing Image type hints
Browse files
core.py
CHANGED
|
@@ -61,9 +61,11 @@ def opencv_upscale(img_np: np.ndarray, target_w: int, target_h: int) -> np.ndarr
|
|
| 61 |
return cv2.resize(img_np, (target_w, target_h), interpolation=cv2.INTER_LANCZOS4)
|
| 62 |
|
| 63 |
|
|
|
|
|
|
|
| 64 |
def upscale_image(
|
| 65 |
-
image:
|
| 66 |
-
) -> tuple[
|
| 67 |
|
| 68 |
if image is None:
|
| 69 |
return None, "❌ No image provided.", None
|
|
|
|
| 61 |
return cv2.resize(img_np, (target_w, target_h), interpolation=cv2.INTER_LANCZOS4)
|
| 62 |
|
| 63 |
|
| 64 |
+
from typing import Any
|
| 65 |
+
|
| 66 |
def upscale_image(
|
| 67 |
+
image: Any, method: str, target_str: str
|
| 68 |
+
) -> tuple[Any, str, Any]:
|
| 69 |
|
| 70 |
if image is None:
|
| 71 |
return None, "❌ No image provided.", None
|