phamson02 commited on
Commit
0eb9251
1 Parent(s): 37e19c1

preprocess input text

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -20,6 +20,10 @@ models = {
20
 
21
 
22
  def generate_poem(text, style):
 
 
 
 
23
  # Choose the model based on the selected style
24
  model = models[style]
25
 
 
20
 
21
 
22
  def generate_poem(text, style):
23
+ # Preprocess the input text
24
+ text = text.strip()
25
+ text = text.lower()
26
+
27
  # Choose the model based on the selected style
28
  model = models[style]
29