File size: 720 Bytes
8fc0623 6e933db ee2be95 1f06f62 79dd756 6e933db ee2be95 d669161 79dd756 ee2be95 d669161 1f06f62 79dd756 461f3a7 d669161 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import gradio as gr
import spaces
from omr_backend import app as fastapi_app
@spaces.GPU
def zero_gpu_ready(message: str = "ready") -> str:
return f"ZeroGPU function detected and available: {message}"
with gr.Blocks(title="OMR Comparator Backend") as demo:
gr.Markdown("# OMR Comparator Backend")
gr.Markdown("Gateway health check for the OMR Bench application.")
message = gr.Textbox(value="ready", label="Message")
check = gr.Button("Check ZeroGPU")
output = gr.Textbox(label="Status")
check.click(
fn=zero_gpu_ready,
inputs=message,
outputs=output,
api_name="zero_gpu_ready",
)
demo.queue()
app = gr.mount_gradio_app(fastapi_app, demo, path="/") |