areebsatin commited on
Commit
6a145c0
·
1 Parent(s): 8a21f35

Fix Gradio Pydantic Bug by removing Image type hints

Browse files
Files changed (1) hide show
  1. core.py +4 -2
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: Image.Image | None, method: str, target_str: str
66
- ) -> tuple[Image.Image | None, str, str | None]:
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