Spaces:
Paused
Paused
Update app.py
Browse files
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)
|
62 |
-
|
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
|