YOSOYYONOSOYOTRO commited on
Commit
f2de3e6
·
verified ·
1 Parent(s): 6d2bc7d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -6,6 +6,17 @@ import logging
6
  logging.basicConfig(level=logging.INFO)
7
  logger = logging.getLogger("hf_app")
8
 
 
 
 
 
 
 
 
 
 
 
 
9
  # Ensure Playwright browser binaries are installed
10
  try:
11
  logger.info("Verificando/instalando Playwright Chromium...")
 
6
  logging.basicConfig(level=logging.INFO)
7
  logger = logging.getLogger("hf_app")
8
 
9
+ # Satisfy Hugging Face ZeroGPU check if ZeroGPU hardware is selected
10
+ try:
11
+ import spaces
12
+ @spaces.GPU(duration=1)
13
+ def _zero_gpu_init():
14
+ return True
15
+ _zero_gpu_init()
16
+ logger.info("ZeroGPU check satisfied.")
17
+ except Exception as e:
18
+ logger.info(f"ZeroGPU check skipped: {e}")
19
+
20
  # Ensure Playwright browser binaries are installed
21
  try:
22
  logger.info("Verificando/instalando Playwright Chromium...")