Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,12 @@ dice_type = st.selectbox("๐ฒ Select a dice type", options=list(dice_types.keys
|
|
27 |
num_rolls = st.slider("๐ฒ How many times do you want to roll the dice?", 1, 1000000, 100)
|
28 |
|
29 |
# Create a string with the rolls for the selected dice type
|
30 |
-
rolls = [str(pd.Series([dice_types[dice_type]["sides"]] * num_rolls).apply(pd.Series.sample, replace=True))]
|
|
|
|
|
|
|
|
|
|
|
31 |
rolls = rolls[0].strip('[]').split('\n')
|
32 |
|
33 |
# Create a button to roll the dice
|
|
|
27 |
num_rolls = st.slider("๐ฒ How many times do you want to roll the dice?", 1, 1000000, 100)
|
28 |
|
29 |
# Create a string with the rolls for the selected dice type
|
30 |
+
#orig: rolls = [str(pd.Series([dice_types[dice_type]["sides"]] * num_rolls).apply(pd.Series.sample, replace=True))]
|
31 |
+
#replaced:
|
32 |
+
rolls = pd.DataFrame([dice_types[dice_type]["sides"]] * num_rolls)[0].apply(pd.Series.sample, replace=True).tolist()
|
33 |
+
|
34 |
+
|
35 |
+
#rolls = [str(pd.Series([dice_types[dice_type]["sides"]] * num_rolls).apply(pd.Series.sample, replace=True))]
|
36 |
rolls = rolls[0].strip('[]').split('\n')
|
37 |
|
38 |
# Create a button to roll the dice
|