DiceRoll / app.py
alexmac93's picture
Update app.py
6b2df11 verified
raw
history blame contribute delete
407 Bytes
import gradio as gr
import random
def roll_dice(sides=6):
return random.randint(1, sides)
demo = gr.Interface(
fn=roll_dice,
inputs=gr.Number(value=6, label="Number of Sides"),
outputs="text",
title="Dice Roller",
description="Enter the number of sides for the dice and get the roll result. Copy of the Dice Roll space by nsarrazin which is no longer working."
)
demo.launch()