Mungert commited on
Commit
36fcee4
·
verified ·
1 Parent(s): 1dc5096

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -4,7 +4,7 @@ from contextlib import asynccontextmanager
4
 
5
  import gradio as gr
6
  from fastapi import FastAPI
7
-
8
  from config import settings
9
  from rabbit_base import RabbitBase
10
  from listener import RabbitListenerBase
@@ -12,21 +12,11 @@ from rabbit_repo import RabbitRepo
12
  from service import LLMService
13
  from runners.base import ILLMRunner
14
 
15
- # ---------------- @spaces.GPU section (ZeroGPU needs this) ----------------
16
- try:
17
- import spaces
18
- ZERO_GPU_AVAILABLE = True
19
-
20
- @spaces.GPU # NOTE: no parentheses per HF docs; simplest reliable form
21
- def gpu_ready_probe() -> str:
22
- # trivial, no tensor allocations
23
- return "gpu-probe-ok"
24
-
25
- except Exception:
26
- ZERO_GPU_AVAILABLE = False
27
 
 
28
  def gpu_ready_probe() -> str:
29
- return "cpu-only"
 
30
 
31
  # ---------------- Runner factory (stub) ----------------
32
  class EchoRunner(ILLMRunner):
 
4
 
5
  import gradio as gr
6
  from fastapi import FastAPI
7
+ import spaces
8
  from config import settings
9
  from rabbit_base import RabbitBase
10
  from listener import RabbitListenerBase
 
12
  from service import LLMService
13
  from runners.base import ILLMRunner
14
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ @spaces.GPU # NOTE: no parentheses per HF docs; simplest reliable form
17
  def gpu_ready_probe() -> str:
18
+ # trivial, no tensor allocations
19
+ return "gpu-probe-ok"
20
 
21
  # ---------------- Runner factory (stub) ----------------
22
  class EchoRunner(ILLMRunner):