Download app.py from XPMaster/rcon-test: direct link, hf CLI and curl.
- Browser
- Download file 378 Bytes
-
https://huggingface.co/spaces/XPMaster/rcon-test/resolve/main/app.py
- Command line
-
hf download hf://spaces/XPMaster/rcon-test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/XPMaster/rcon-test/resolve/main/app.py
378 Bytes
| import gradio as gr | |
| from valve.rcon import RCON | |
| def run(): | |
| SERVER_ADDRESS = ("209.250.239.165", 27015) | |
| PASSWORD = "12345" | |
| with RCON(SERVER_ADDRESS, PASSWORD) as rcon: | |
| msg = (rcon("status")) | |
| return str(msg) | |
| with gr.Blocks() as Main: | |
| marky = gr.Markdown(""" | |
| # ⏳Loading...⏳ | |
| """) | |
| Main.load(fn=run,inputs=None,outputs=marky) | |
| Main.launch(debug=True) |