Spaces:
Paused
Paused
Update app.py via AI Editor
Browse files
app.py
CHANGED
@@ -1,373 +1 @@
|
|
1 |
-
|
2 |
-
import base64
|
3 |
-
import logging
|
4 |
-
import threading
|
5 |
-
import pandas as pd
|
6 |
-
from io import BytesIO, StringIO
|
7 |
-
from docx import Document
|
8 |
-
from PyPDF2 import PdfReader
|
9 |
-
import dash
|
10 |
-
import dash_bootstrap_components as dbc
|
11 |
-
from dash import html, dcc, Input, Output, State, dash_table, callback_context
|
12 |
-
|
13 |
-
logging.basicConfig(level=logging.INFO)
|
14 |
-
logger = logging.getLogger("microhealth-pws")
|
15 |
-
|
16 |
-
ANTHROPIC_KEY = os.environ.get("ANTHROPIC_API_KEY", "")
|
17 |
-
import anthropic
|
18 |
-
anthropic_client = anthropic.Anthropic(api_key=ANTHROPIC_KEY)
|
19 |
-
CLAUDE3_SONNET_MODEL = "claude-3-7-sonnet-20250219"
|
20 |
-
CLAUDE3_MAX_CONTEXT_TOKENS = 200_000
|
21 |
-
CLAUDE3_MAX_OUTPUT_TOKENS = 64_000
|
22 |
-
|
23 |
-
document_types = {
|
24 |
-
"Shred": "Ignore all other instructions and generate only requirements spreadsheet of the Project Work Statement (PWS) identified by action words like shall, will, perform etc. by pws section, requirement. Do not write as if you're responding to the proposal. Its a spreadsheet to distill the requirements, not microhealth's approach",
|
25 |
-
"Pink": "Create a highly detailed Pink Team document based on the PWS outline. Your goal is to be compliant and compelling. Focus on describing the approach and how it will be done, the steps, workflow, people, processes and technology based on well known industry standards to accomplish the task. Be sure to demonstrate innovation.",
|
26 |
-
"Pink Review": "Ignore all other instructions and generate and evaluate compliance of the Pink Team document against the requirements and output only a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery. you must also take into account section L&M of the document which is the evaluation criteria to be sure we address them.",
|
27 |
-
"Red": "Produce a highly detailed Red Team document based on the Pink Review by pws sections. Your goal is to be compliant and compelling by recovering all the findings in Pink Review. Focus on describing the approach and how it will be done, the steps, workflow, people, processes and technology to accomplish the task. Be sure to refer to research that validates the approach and cite sources with measurable outcomes",
|
28 |
-
"Red Review": "Ignore all other instructions and generate and evaluate compliance of the Red Team document against the requirements and output a only a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery. you must also take into account section L&M of the document which is the evaluation criteria to be sure we address them",
|
29 |
-
"Gold": "Create a highly detailed Gold Team document based on the PWS response by pws sections. Your goal is to be compliant and compelling by recovering all the findings in Red Review. Focus on describing the approach and how it will be done, the steps, workflow, people, processes and technology to accomplish the task. Be sure to refer to research that validates the approach and cite sources with measurable outcomes and improve on innovations of the approach",
|
30 |
-
"Gold Review": "Ignore all other instructions and generate and perform a final compliance review against the requirements and output only a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery. you must also take into account section L&M of the document which is the evaluation criteria to be sure we address them",
|
31 |
-
"Virtual Board": "Ignore all other instructions and generate and based on the requirements and in particular the evaulation criteria, you will evaluate the proposal as if you were a contracting office and provide section by section evaluation as unsatisfactory, satisfactory, good, very good, excellent and why and produce only spreadsheet",
|
32 |
-
"LOE": "Ignore all other instructions and generate and generate a Level of Effort (LOE) breakdown and produce only spreadsheet"
|
33 |
-
}
|
34 |
-
|
35 |
-
def process_document(contents, filename):
|
36 |
-
try:
|
37 |
-
content_type, content_string = contents.split(',')
|
38 |
-
decoded = base64.b64decode(content_string)
|
39 |
-
if filename.lower().endswith('.docx'):
|
40 |
-
doc = Document(BytesIO(decoded))
|
41 |
-
text = "\n".join([p.text for p in doc.paragraphs])
|
42 |
-
return text
|
43 |
-
elif filename.lower().endswith('.pdf'):
|
44 |
-
pdf = PdfReader(BytesIO(decoded))
|
45 |
-
text = "".join(page.extract_text() or "" for page in pdf.pages)
|
46 |
-
return text
|
47 |
-
else:
|
48 |
-
return f"Unsupported file format: {filename}"
|
49 |
-
except Exception as e:
|
50 |
-
logger.error(f"Error processing document {filename}: {e}")
|
51 |
-
return f"Failed to process document: {e}"
|
52 |
-
|
53 |
-
def call_claude(prompt, max_tokens=2048):
|
54 |
-
try:
|
55 |
-
res = anthropic_client.messages.create(
|
56 |
-
model=CLAUDE3_SONNET_MODEL,
|
57 |
-
max_tokens=max_tokens,
|
58 |
-
temperature=0.1,
|
59 |
-
system="You are a world class proposal consultant and proposal manager.",
|
60 |
-
messages=[{"role": "user", "content": prompt}]
|
61 |
-
)
|
62 |
-
logger.info("Anthropic API call successful.")
|
63 |
-
return res.content[0].text if hasattr(res, "content") else str(res)
|
64 |
-
except Exception as e:
|
65 |
-
logger.error(f"Anthropic API error: {e}")
|
66 |
-
return f"Anthropic API error: {e}"
|
67 |
-
|
68 |
-
def spreadsheet_to_df(text):
|
69 |
-
lines = [l.strip() for l in text.splitlines() if '|' in l]
|
70 |
-
if not lines:
|
71 |
-
return pd.DataFrame()
|
72 |
-
header = lines[0].strip('|').split('|')
|
73 |
-
data = [l.strip('|').split('|') for l in lines[1:]]
|
74 |
-
return pd.DataFrame(data, columns=[h.strip() for h in header])
|
75 |
-
|
76 |
-
def generate_content(document, doc_type, instructions=""):
|
77 |
-
prompt = f"{document_types[doc_type]}\n\n"
|
78 |
-
if instructions:
|
79 |
-
prompt += f"Additional Instructions:\n{instructions}\n\n"
|
80 |
-
prompt += f"Document:\n{document}\n\nOutput only one spreadsheet table, use | as column separator."
|
81 |
-
logger.info(f"Generating content for {doc_type} with prompt length {len(prompt)}")
|
82 |
-
response = call_claude(prompt, max_tokens=4096)
|
83 |
-
df = spreadsheet_to_df(response)
|
84 |
-
return response, df
|
85 |
-
|
86 |
-
def parse_markdown(doc, content):
|
87 |
-
for para in content.split('\n\n'):
|
88 |
-
doc.add_paragraph(para)
|
89 |
-
|
90 |
-
def create_docx(content):
|
91 |
-
doc = Document()
|
92 |
-
parse_markdown(doc, content)
|
93 |
-
return doc
|
94 |
-
|
95 |
-
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP], suppress_callback_exceptions=True)
|
96 |
-
app.title = "MicroHealth PWS Analyzer"
|
97 |
-
|
98 |
-
main_tabs = [
|
99 |
-
{"id": "shred", "label": "Shred"},
|
100 |
-
{"id": "pink", "label": "Pink"},
|
101 |
-
{"id": "pink-review", "label": "Pink Review"},
|
102 |
-
{"id": "red", "label": "Red"},
|
103 |
-
{"id": "red-review", "label": "Red Review"},
|
104 |
-
{"id": "gold", "label": "Gold"},
|
105 |
-
{"id": "gold-review", "label": "Gold Review"},
|
106 |
-
{"id": "virtual-board", "label": "Virtual Board"},
|
107 |
-
{"id": "loe", "label": "LOE"},
|
108 |
-
]
|
109 |
-
|
110 |
-
def make_upload(btn_id):
|
111 |
-
return dcc.Upload(
|
112 |
-
id=f'{btn_id}-upload',
|
113 |
-
children=html.Div(['Drag and Drop or ', html.A('Select Files')]),
|
114 |
-
style={'width': '100%', 'height': '60px', 'lineHeight': '60px', 'borderWidth': '1px', 'borderStyle': 'dashed', 'borderRadius': '5px', 'textAlign': 'center', 'margin': '10px'},
|
115 |
-
multiple=False
|
116 |
-
)
|
117 |
-
|
118 |
-
def make_textarea(btn_id, placeholder):
|
119 |
-
return dbc.Textarea(
|
120 |
-
id=f'{btn_id}-instructions',
|
121 |
-
placeholder=placeholder,
|
122 |
-
style={'height': '80px', 'marginBottom': '10px', 'width': '100%', 'whiteSpace': 'pre-wrap', 'overflowWrap': 'break-word'}
|
123 |
-
)
|
124 |
-
|
125 |
-
def make_shred_doc_preview():
|
126 |
-
return dbc.Card(
|
127 |
-
dbc.CardBody([
|
128 |
-
html.Div(id="shred-upload-preview", style={"whiteSpace": "pre-wrap", "overflowWrap": "break-word"}),
|
129 |
-
]), className="mb-2", id="shred-doc-preview-card", style={"display": "none"}
|
130 |
-
)
|
131 |
-
|
132 |
-
def make_shred_controls():
|
133 |
-
return html.Div([
|
134 |
-
dbc.Button("Delete Document", id="shred-delete-btn", className="mt-2 btn-tertiary", n_clicks=0, style={'marginRight': '8px'}),
|
135 |
-
dbc.Button("Generate Shred", id='shred-btn', className="mt-2 btn-primary", n_clicks=0, style={'marginRight': '8px'}),
|
136 |
-
dbc.Button("Download Shred Report", id="shred-download-btn", className="mt-2 btn-secondary", n_clicks=0),
|
137 |
-
dcc.Download(id="shred-download"),
|
138 |
-
], style={'display': 'flex', 'flexWrap': 'wrap', 'gap': '8px', 'marginTop': '10px', 'marginBottom': '10px'})
|
139 |
-
|
140 |
-
def make_tab(tab_id, label):
|
141 |
-
if tab_id == "shred":
|
142 |
-
return dbc.Card(
|
143 |
-
dbc.CardBody([
|
144 |
-
make_textarea(tab_id, f"Instructions for {label} (optional)"),
|
145 |
-
make_shred_controls(),
|
146 |
-
make_upload(tab_id),
|
147 |
-
make_shred_doc_preview(),
|
148 |
-
dcc.Loading(html.Div(id=f'{tab_id}-output'), id="loading", type="default", parent_style={'justifyContent': 'center'}),
|
149 |
-
dcc.Store(id="shred-upload-store")
|
150 |
-
]), className="mb-4"
|
151 |
-
)
|
152 |
-
else:
|
153 |
-
return dbc.Card(
|
154 |
-
dbc.CardBody([
|
155 |
-
make_textarea(tab_id, f"Instructions for {label} (optional)"),
|
156 |
-
make_upload(tab_id),
|
157 |
-
dbc.Button(f"Generate {label}", id=f'{tab_id}-btn', className="mt-2 btn-primary", n_clicks=0),
|
158 |
-
dcc.Loading(html.Div(id=f'{tab_id}-output'), type="default", parent_style={'justifyContent': 'center'}),
|
159 |
-
dbc.Button(f"Download {label} Report", id=f"{tab_id}-download-btn", className="mt-2 btn-secondary", n_clicks=0),
|
160 |
-
dcc.Download(id=f"{tab_id}-download")
|
161 |
-
]), className="mb-4"
|
162 |
-
)
|
163 |
-
|
164 |
-
tab_cards = {tab["id"]: make_tab(tab["id"], tab["label"]) for tab in main_tabs}
|
165 |
-
|
166 |
-
nav_items = [
|
167 |
-
dbc.NavLink(tab["label"], href="#", id=f"nav-{tab['id']}", active=(tab["id"] == "shred")) for tab in main_tabs
|
168 |
-
]
|
169 |
-
|
170 |
-
def all_tabs_div():
|
171 |
-
return html.Div(
|
172 |
-
[
|
173 |
-
html.Div(
|
174 |
-
tab_cards[tab["id"]],
|
175 |
-
id=f"tabdiv-{tab['id']}",
|
176 |
-
style={"display": "block" if tab["id"] == "shred" else "none"}
|
177 |
-
)
|
178 |
-
for tab in main_tabs
|
179 |
-
]
|
180 |
-
)
|
181 |
-
|
182 |
-
app.layout = dbc.Container([
|
183 |
-
html.H1("MicroHealth PWS Analysis and Response Generator", className="my-3"),
|
184 |
-
dbc.Row([
|
185 |
-
dbc.Col(
|
186 |
-
dbc.Card(
|
187 |
-
dbc.CardBody([
|
188 |
-
html.Div(nav_items, className="nav flex-column"),
|
189 |
-
])
|
190 |
-
), width=2, style={'minWidth': '150px'}
|
191 |
-
),
|
192 |
-
dbc.Col(
|
193 |
-
html.Div(all_tabs_div(), id="main-content"),
|
194 |
-
width=10
|
195 |
-
)
|
196 |
-
])
|
197 |
-
], fluid=True)
|
198 |
-
|
199 |
-
@app.callback(
|
200 |
-
[Output(f"tabdiv-{tab['id']}", "style") for tab in main_tabs],
|
201 |
-
[Input(f"nav-{tab['id']}", "n_clicks") for tab in main_tabs],
|
202 |
-
prevent_initial_call=False
|
203 |
-
)
|
204 |
-
def display_tab(*nav_clicks):
|
205 |
-
triggered = callback_context.triggered
|
206 |
-
idx = 0
|
207 |
-
if triggered:
|
208 |
-
for i, tab in enumerate(main_tabs):
|
209 |
-
if triggered[0]["prop_id"].startswith(f"nav-{tab['id']}"):
|
210 |
-
idx = i
|
211 |
-
break
|
212 |
-
styles = []
|
213 |
-
for i, tab in enumerate(main_tabs):
|
214 |
-
if i == idx:
|
215 |
-
styles.append({"display": "block"})
|
216 |
-
else:
|
217 |
-
styles.append({"display": "none"})
|
218 |
-
return styles
|
219 |
-
|
220 |
-
@app.callback(
|
221 |
-
[
|
222 |
-
Output("shred-upload-store", "data"),
|
223 |
-
Output("shred-upload-preview", "children"),
|
224 |
-
Output("shred-doc-preview-card", "style"),
|
225 |
-
],
|
226 |
-
[
|
227 |
-
Input("shred-upload", "contents"),
|
228 |
-
Input("shred-delete-btn", "n_clicks")
|
229 |
-
],
|
230 |
-
[
|
231 |
-
State("shred-upload", "filename"),
|
232 |
-
State("shred-upload-store", "data"),
|
233 |
-
],
|
234 |
-
prevent_initial_call=True
|
235 |
-
)
|
236 |
-
def update_shred_upload(contents, delete_clicks, filename, stored_data):
|
237 |
-
triggered = callback_context.triggered
|
238 |
-
logger.info("Shred upload callback triggered.")
|
239 |
-
if not triggered:
|
240 |
-
return dash.no_update, dash.no_update, dash.no_update
|
241 |
-
trig_id = triggered[0]["prop_id"].split(".")[0]
|
242 |
-
if trig_id == "shred-upload":
|
243 |
-
if contents and filename:
|
244 |
-
logger.info(f"Document uploaded in Shred: {filename}")
|
245 |
-
full_text = process_document(contents, filename)
|
246 |
-
preview = html.Div([
|
247 |
-
html.B(f"Uploaded: {filename}"),
|
248 |
-
html.Br(),
|
249 |
-
html.Div(full_text[:2000] + ("..." if len(full_text) > 2000 else ""), style={"whiteSpace": "pre-wrap", "overflowWrap": "break-word", "fontSize": "small"})
|
250 |
-
])
|
251 |
-
# Store the full document text, filename, and preview
|
252 |
-
return {"contents": contents, "filename": filename, "full_text": full_text, "preview": full_text[:2000]}, preview, {"display": "block"}
|
253 |
-
else:
|
254 |
-
return None, "", {"display": "none"}
|
255 |
-
elif trig_id == "shred-delete-btn":
|
256 |
-
logger.info("Shred document deleted by user.")
|
257 |
-
return None, "", {"display": "none"}
|
258 |
-
return dash.no_update, dash.no_update, dash.no_update
|
259 |
-
|
260 |
-
@app.callback(
|
261 |
-
[Output(f'{tab_id}-output', 'children') for tab_id in tab_cards] +
|
262 |
-
[Output(f"{tab_id}-download", "data") for tab_id in tab_cards],
|
263 |
-
[Input(f'{tab_id}-btn', 'n_clicks') for tab_id in tab_cards] +
|
264 |
-
[Input(f"{tab_id}-download-btn", "n_clicks") for tab_id in tab_cards] +
|
265 |
-
[Input("shred-btn", "n_clicks"), Input("shred-download-btn", "n_clicks")],
|
266 |
-
[State(f'{tab_id}-upload', 'contents') for tab_id in tab_cards] +
|
267 |
-
[State(f'{tab_id}-upload', 'filename') for tab_id in tab_cards] +
|
268 |
-
[State(f'{tab_id}-instructions', 'value') for tab_id in tab_cards] +
|
269 |
-
[State(f'{tab_id}-output', 'children') for tab_id in tab_cards] +
|
270 |
-
[State("shred-upload-store", "data")]
|
271 |
-
)
|
272 |
-
def handle_all_tabs(*args):
|
273 |
-
n = len(tab_cards)
|
274 |
-
outputs = [None] * (n * 2)
|
275 |
-
ctx = callback_context
|
276 |
-
if not ctx.triggered:
|
277 |
-
return outputs
|
278 |
-
trig = ctx.triggered[0]['prop_id']
|
279 |
-
logger.info(f"Main callback triggered by {trig}")
|
280 |
-
for idx, tab_id in enumerate(tab_cards):
|
281 |
-
gen_btn = f"{tab_id}-btn.n_clicks"
|
282 |
-
dl_btn = f"{tab_id}-download-btn.n_clicks"
|
283 |
-
out_idx = idx
|
284 |
-
dl_idx = idx + n
|
285 |
-
upload_idx = idx
|
286 |
-
filename_idx = idx + n
|
287 |
-
instr_idx = idx + 2 * n
|
288 |
-
prev_output_idx = idx + 3 * n
|
289 |
-
shred_upload_store_idx = 4 * n
|
290 |
-
|
291 |
-
if tab_id == "shred":
|
292 |
-
shred_gen_btn = "shred-btn.n_clicks"
|
293 |
-
shred_dl_btn = "shred-download-btn.n_clicks"
|
294 |
-
if trig == shred_gen_btn:
|
295 |
-
logger.info(f"Generate Shred button pressed for {tab_id}")
|
296 |
-
shred_data = args[shred_upload_store_idx]
|
297 |
-
instr = args[instr_idx] or ""
|
298 |
-
if shred_data and "full_text" in shred_data and shred_data["full_text"]:
|
299 |
-
doc = shred_data["full_text"]
|
300 |
-
logger.info(f"Shred document will be sent to Anthropic with instructions: {instr}")
|
301 |
-
content, df = generate_content(doc, "Shred", instr)
|
302 |
-
# Store Anthropic result in outputs
|
303 |
-
if not df.empty:
|
304 |
-
outputs[out_idx] = dash_table.DataTable(
|
305 |
-
data=df.to_dict('records'),
|
306 |
-
columns=[{'name': i, 'id': i} for i in df.columns],
|
307 |
-
style_table={'overflowX': 'auto'},
|
308 |
-
style_cell={'textAlign': 'left', 'padding': '5px'},
|
309 |
-
style_header={'fontWeight': 'bold'}
|
310 |
-
)
|
311 |
-
else:
|
312 |
-
outputs[out_idx] = html.Div([
|
313 |
-
html.B("Anthropic Response Preview:"),
|
314 |
-
dcc.Markdown(content)
|
315 |
-
])
|
316 |
-
else:
|
317 |
-
outputs[out_idx] = "Please upload a document to begin."
|
318 |
-
elif trig == shred_dl_btn:
|
319 |
-
prev_output = args[prev_output_idx]
|
320 |
-
if (hasattr(prev_output, 'props') and 'data' in prev_output.props):
|
321 |
-
df = pd.DataFrame(prev_output.props['data'])
|
322 |
-
buffer = BytesIO()
|
323 |
-
df.to_csv(buffer, index=False)
|
324 |
-
outputs[dl_idx] = dcc.send_bytes(buffer.getvalue(), f"{tab_id}_report.csv")
|
325 |
-
elif prev_output:
|
326 |
-
# If prev_output is markdown or text
|
327 |
-
buffer = BytesIO(prev_output.encode("utf-8") if isinstance(prev_output, str) else b"")
|
328 |
-
outputs[dl_idx] = dcc.send_bytes(buffer.getvalue(), f"{tab_id}_report.txt")
|
329 |
-
else:
|
330 |
-
outputs[dl_idx] = None
|
331 |
-
if trig == gen_btn:
|
332 |
-
logger.info(f"Generate button pressed for {tab_id}")
|
333 |
-
upload = args[upload_idx]
|
334 |
-
filename = args[filename_idx]
|
335 |
-
instr = args[instr_idx] or ""
|
336 |
-
doc_type = tab_id.replace('-', ' ').title().replace(' ', '')
|
337 |
-
doc_type = next((k for k in document_types if k.lower().replace(' ', '') == tab_id.replace('-', '')), tab_id.title())
|
338 |
-
if upload and filename:
|
339 |
-
doc = process_document(upload, filename)
|
340 |
-
else:
|
341 |
-
doc = ""
|
342 |
-
if doc or tab_id == "virtual-board":
|
343 |
-
content, df = generate_content(doc, doc_type, instr)
|
344 |
-
if not df.empty:
|
345 |
-
outputs[out_idx] = dash_table.DataTable(
|
346 |
-
data=df.to_dict('records'),
|
347 |
-
columns=[{'name': i, 'id': i} for i in df.columns],
|
348 |
-
style_table={'overflowX': 'auto'},
|
349 |
-
style_cell={'textAlign': 'left', 'padding': '5px'},
|
350 |
-
style_header={'fontWeight': 'bold'}
|
351 |
-
)
|
352 |
-
else:
|
353 |
-
outputs[out_idx] = dcc.Markdown(content)
|
354 |
-
else:
|
355 |
-
outputs[out_idx] = "Please upload a document to begin."
|
356 |
-
elif trig == dl_btn:
|
357 |
-
prev_output = args[prev_output_idx]
|
358 |
-
if prev_output and hasattr(prev_output, 'props') and 'data' in prev_output.props:
|
359 |
-
df = pd.DataFrame(prev_output.props['data'])
|
360 |
-
buffer = BytesIO()
|
361 |
-
df.to_csv(buffer, index=False)
|
362 |
-
outputs[dl_idx] = dcc.send_bytes(buffer.getvalue(), f"{tab_id}_report.csv")
|
363 |
-
elif prev_output:
|
364 |
-
buffer = BytesIO(prev_output.encode("utf-8") if isinstance(prev_output, str) else b"")
|
365 |
-
outputs[dl_idx] = dcc.send_bytes(buffer.getvalue(), f"{tab_id}_report.txt")
|
366 |
-
else:
|
367 |
-
outputs[dl_idx] = None
|
368 |
-
return outputs
|
369 |
-
|
370 |
-
if __name__ == '__main__':
|
371 |
-
print("Starting the Dash application...")
|
372 |
-
app.run(debug=True, host='0.0.0.0', port=7860, threaded=True)
|
373 |
-
print("Dash application has finished running.")
|
|
|
1 |
+
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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