Temporary GPU probe 3
Browse files
app.py
CHANGED
|
@@ -13,10 +13,7 @@ from detector import Detector
|
|
| 13 |
mark("import detector")
|
| 14 |
gpu = Detector(device="cuda")
|
| 15 |
mark("gpu detector placed")
|
| 16 |
-
|
| 17 |
-
mark("cpu detector loaded")
|
| 18 |
-
cpu.detect("Warm up the models before taking requests. " * 12)
|
| 19 |
-
mark("cpu warmup detect")
|
| 20 |
|
| 21 |
@spaces.GPU(duration=30)
|
| 22 |
def probe():
|
|
@@ -38,7 +35,7 @@ def p():
|
|
| 38 |
return out
|
| 39 |
|
| 40 |
@app.get("/health")
|
| 41 |
-
def h(): return {"ok": True, "probe":
|
| 42 |
|
| 43 |
if __name__ == "__main__":
|
| 44 |
app.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 13 |
mark("import detector")
|
| 14 |
gpu = Detector(device="cuda")
|
| 15 |
mark("gpu detector placed")
|
| 16 |
+
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
@spaces.GPU(duration=30)
|
| 19 |
def probe():
|
|
|
|
| 35 |
return out
|
| 36 |
|
| 37 |
@app.get("/health")
|
| 38 |
+
def h(): return {"ok": True, "probe": 3}
|
| 39 |
|
| 40 |
if __name__ == "__main__":
|
| 41 |
app.launch(server_name="0.0.0.0", server_port=7860)
|