Ksu2023 commited on
Commit
ee2be95
·
verified ·
1 Parent(s): 6e933db

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -15
app.py CHANGED
@@ -1,24 +1,18 @@
1
  import gradio as gr
2
  import spaces
3
- from omr_backend import app
4
 
5
 
6
  @spaces.GPU(duration=60)
7
  def zero_gpu_ready():
8
- return "ZeroGPU is available."
9
 
10
 
11
- def status():
12
- return "OMR gateway is running. Configure model adapter URLs to process images."
13
-
14
-
15
- demo = gr.Interface(
16
- fn=status,
17
- inputs=[],
18
- outputs=gr.Textbox(label="Gateway status"),
19
- title="OMR Comparator Backend",
20
- description="FastAPI gateway for the OMR model comparison app.",
21
- )
22
-
23
- app = gr.mount_gradio_app(app, demo, path="/")
24
 
 
 
1
  import gradio as gr
2
  import spaces
3
+ from omr_backend import app as fastapi_app
4
 
5
 
6
  @spaces.GPU(duration=60)
7
  def zero_gpu_ready():
8
+ return "ZeroGPU function detected and available."
9
 
10
 
11
+ with gr.Blocks(title="OMR Comparator Backend") as demo:
12
+ gr.Markdown("# OMR Comparator Backend")
13
+ gr.Markdown("Gateway health check for the OMR Bench application.")
14
+ check = gr.Button("Check ZeroGPU")
15
+ output = gr.Textbox(label="Status")
16
+ check.click(fn=zero_gpu_ready, inputs=[], outputs=output, api_name="zero_gpu_ready")
 
 
 
 
 
 
 
17
 
18
+ app = gr.mount_gradio_app(fastapi_app, demo, path="/")