alexmac93/DiceRoll
0
1import gradio as gr2import random3 4def roll_dice(sides=6):5 return random.randint(1, sides)6 7demo = gr.Interface(8 fn=roll_dice, 9 inputs=gr.Number(value=6, label="Number of Sides"), 10 outputs="text", 11 title="Dice Roller",12 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."13)14 15demo.launch()16 