ranamhamoud commited on
Commit
01c9b0c
·
verified ·
1 Parent(s): 04c002a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -55,13 +55,11 @@ class Story(Document):
55
  # Utility function for prompts
56
  def make_prompt(entry):
57
  return f"### Human: Don't repeat the assesments, limit to 500 words {entry} ### Assistant:"
58
- # f"TELL A STORY, RELATE TO COMPUTER SCIENCE, INCLUDE ASSESMENTS. MAKE IT REALISTIC AND AROUND 800 WORDS: {entry}"
59
 
60
  def process_text(text):
61
- text = re.sub(r'\[.*?\]', '', text) # Removes any text in square brackets
62
- text = re.sub(r'\(.*?\)', '', text) # Removes any text in round brackets
63
- text = re.sub(r'\{.*?\}', '', text) # Removes any text in curly brackets
64
-
65
  return text
66
 
67
  # Gradio Function
 
55
  # Utility function for prompts
56
  def make_prompt(entry):
57
  return f"### Human: Don't repeat the assesments, limit to 500 words {entry} ### Assistant:"
58
+ # f"TELL A STORY, RELATE TO COMPUTER SCIENCE, INCLUDE ASSESMENTS. MAKE IT REALISTIC AND AROUND 800 WORDS, END THE STORY WITH "THE END.": {entry}"
59
 
60
  def process_text(text):
61
+ text = re.sub(r'\[.*?\]', '', text, flags=re.DOTALL)
62
+
 
 
63
  return text
64
 
65
  # Gradio Function