Delyno/gr-test
0
1import gradio as gr2import spaces3 4 5# ZeroGPU hardware refuses to start unless a @spaces.GPU function exists.6# my_tool is CPU-only, so this placeholder is never called.7@spaces.GPU8def _zerogpu_placeholder():9 pass10 11def my_tool(input_text: str) -> str:12 """Do something with input.13 14 Args:15 input_text: The input16 17 Returns:18 The result19 """20 return f"Processed: {input_text}"21 22demo = gr.Interface(fn=my_tool, inputs="text", outputs="text")23 24if __name__ == "__main__":25 demo.launch(mcp_server=True)