sagnik-mukherjee commited on
Commit
4652368
·
verified ·
1 Parent(s): 054dcec

Deploy provenance-first OpenComic-Continue research UI

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -17,6 +17,12 @@ API_URL = os.getenv("MODAL_API_URL", "http://127.0.0.1:8000").rstrip("/")
17
  API_TOKEN = os.getenv("OPENCOMIC_API_TOKEN", "")
18
 
19
 
 
 
 
 
 
 
20
  def _headers() -> dict[str, str]:
21
  return {"Authorization": f"Bearer {API_TOKEN}"} if API_TOKEN else {}
22
 
@@ -58,7 +64,6 @@ def _data_url_to_image(value: str) -> Image.Image:
58
  return Image.open(io.BytesIO(payload)).convert("RGB")
59
 
60
 
61
- @spaces.GPU(duration=180)
62
  def generate(
63
  memory: dict | None,
64
  pages: int,
 
17
  API_TOKEN = os.getenv("OPENCOMIC_API_TOKEN", "")
18
 
19
 
20
+ @spaces.GPU(duration=60)
21
+ def zerogpu_compatibility_probe() -> str:
22
+ """Satisfy the existing ZeroGPU Space hardware contract; normal UI calls use Modal."""
23
+ return "OpenComic uses its authenticated Modal renderer; no Hugging Face GPU is required."
24
+
25
+
26
  def _headers() -> dict[str, str]:
27
  return {"Authorization": f"Bearer {API_TOKEN}"} if API_TOKEN else {}
28
 
 
64
  return Image.open(io.BytesIO(payload)).convert("RGB")
65
 
66
 
 
67
  def generate(
68
  memory: dict | None,
69
  pages: int,