Multiplayer / interface.py
ILLERRAPS's picture
Upload folder using huggingface_hub
2cdc05c verified
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()