Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -128,10 +128,13 @@ def extract_entities(search_results: str) -> str:
|
|
128 |
last_period = trunc.rfind('. ')
|
129 |
search_results = trunc[:last_period + 1] if last_period > 3000 else trunc
|
130 |
|
131 |
-
prompt = f"""Extract all
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
135 |
|
136 |
Text:
|
137 |
{search_results}"""
|
|
|
128 |
last_period = trunc.rfind('. ')
|
129 |
search_results = trunc[:last_period + 1] if last_period > 3000 else trunc
|
130 |
|
131 |
+
prompt = f"""Extract all named entities from the following text.
|
132 |
+
|
133 |
+
Return a JSON object with two keys:
|
134 |
+
- "people": a list of names of people mentioned
|
135 |
+
- "organizations": a list of organization names mentioned
|
136 |
+
|
137 |
+
Respond only with valid JSON. Do not include any explanations, comments, or additional formatting.
|
138 |
|
139 |
Text:
|
140 |
{search_results}"""
|