| import gradio as gr | |
| import os | |
| def greet(name): | |
| return f"Hello {name}!" | |
| demo = gr.Interface(fn=greet, inputs="text", outputs="text") | |
| # Serve noVNC files inside /web-vnc | |
| novnc_path = "/web-ui/static/novnc" | |
| if os.path.exists(novnc_path): | |
| demo.add_static_route("/web-vnc", novnc_path) | |
| demo.launch(server_name="0.0.0.0", server_port=7860) | |