Update app.py
Browse files
app.py
CHANGED
@@ -138,7 +138,12 @@ class EventScraper:
|
|
138 |
|
139 |
def generate_event_extraction_prompt(self, text):
|
140 |
"""Create prompt for LLM to extract event details"""
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
142 |
Find and extract all events from the following text.
|
143 |
For each event, provide:
|
144 |
- Exact event name
|
@@ -163,8 +168,9 @@ class EventScraper:
|
|
163 |
]
|
164 |
|
165 |
If NO events are found, return an empty list [].
|
166 |
-
Only return the json. nothing else. no comments
|
167 |
-
|
|
|
168 |
return prompt
|
169 |
|
170 |
def parse_llm_response(self, response):
|
|
|
138 |
|
139 |
def generate_event_extraction_prompt(self, text):
|
140 |
"""Create prompt for LLM to extract event details"""
|
141 |
+
|
142 |
+
prompt=f'''
|
143 |
+
<|start_header_id|>system<|end_header_id|>
|
144 |
+
|
145 |
+
<|eot_id|><|start_header_id|>user<|end_header_id|>
|
146 |
+
You are an event extraction assistant.
|
147 |
Find and extract all events from the following text.
|
148 |
For each event, provide:
|
149 |
- Exact event name
|
|
|
168 |
]
|
169 |
|
170 |
If NO events are found, return an empty list [].
|
171 |
+
Only return the json. nothing else. no comments.<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
172 |
+
'''
|
173 |
+
|
174 |
return prompt
|
175 |
|
176 |
def parse_llm_response(self, response):
|