Spaces:
Paused
Paused
Download interface.py from ILLERRAPS/Multiplayer: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/spaces/ILLERRAPS/Multiplayer/resolve/main/interface.py
- Command line
-
hf download hf://spaces/ILLERRAPS/Multiplayer/interface.py
-
curl -L -o interface.py https://huggingface.co/spaces/ILLERRAPS/Multiplayer/resolve/main/interface.py
461 Bytes
| import gradio as gr | |
| from game_logic import handle_command | |
| def gradio_command(username, command): | |
| response = handle_command(username, command) | |
| return response | |
| with gr.Blocks() as demo: | |
| gr.Markdown("## GPT RPG") | |
| username = gr.Textbox(label="Username") | |
| command = gr.Textbox(label="Command") | |
| output = gr.Textbox(label="Output") | |
| submit = gr.Button("Submit") | |
| submit.click(gradio_command, [username, command], output) | |
| demo.launch() | |