MixoMax commited on
Commit
a16f6c5
1 Parent(s): 86dad78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -62,7 +62,8 @@ def generate_cards(
62
  text: str = "",
63
  power: str = "",
64
  toughness: str = "",
65
- loyalty: str = ""
 
66
  ):
67
  #ensure n_cards is never 0 or negative
68
  n_cards = int(n_cards)
@@ -133,8 +134,9 @@ def generate_cards(
133
  #"{9}": "(9)",
134
  }
135
 
136
- for key, value in replacements.items():
137
- out_str = out_str.replace(key, value)
 
138
 
139
 
140
  return out_str
 
62
  text: str = "",
63
  power: str = "",
64
  toughness: str = "",
65
+ loyalty: str = "",
66
+ do_replacements: bool = True
67
  ):
68
  #ensure n_cards is never 0 or negative
69
  n_cards = int(n_cards)
 
134
  #"{9}": "(9)",
135
  }
136
 
137
+ if do_replacements:
138
+ for key, value in replacements.items():
139
+ out_str = out_str.replace(key, value)
140
 
141
 
142
  return out_str