Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -315,7 +315,7 @@ def check_compliance_tech(file_name):
|
|
| 315 |
yield "Unsupported file format"
|
| 316 |
def generateCqOemImport(file_name):
|
| 317 |
if file_name.name.endswith(".pdf"):
|
| 318 |
-
|
| 319 |
dd=f"""
|
| 320 |
\n
|
| 321 |
<table>
|
|
@@ -323,8 +323,13 @@ def generateCqOemImport(file_name):
|
|
| 323 |
<tr><td>Output tokens:</td><td>{output_tokens}</td></tr>
|
| 324 |
<tr><td>Total tokens:</td><td>{total_tokens}</td></tr>
|
| 325 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
\n
|
| 327 |
-
{finalHtml}
|
| 328 |
"""
|
| 329 |
yield dd
|
| 330 |
update_log("\n CQ-OEM-Import: "+datetime.now().isoformat()+"\n"+dd+"\n")
|
|
|
|
| 315 |
yield "Unsupported file format"
|
| 316 |
def generateCqOemImport(file_name):
|
| 317 |
if file_name.name.endswith(".pdf"):
|
| 318 |
+
extraction_item_value_html, extraction_html, compliance_html, input_tokens ,output_tokens, total_tokens, result_dic = compliance_import_OEM(file_name, client)
|
| 319 |
dd=f"""
|
| 320 |
\n
|
| 321 |
<table>
|
|
|
|
| 323 |
<tr><td>Output tokens:</td><td>{output_tokens}</td></tr>
|
| 324 |
<tr><td>Total tokens:</td><td>{total_tokens}</td></tr>
|
| 325 |
</table>
|
| 326 |
+
\n Vendor quoted the price as under in the offer. \n
|
| 327 |
+
{extraction_item_value_html}
|
| 328 |
+
\n The extracted value against each point is as under. \n
|
| 329 |
+
{extraction_html}
|
| 330 |
+
\n The compliance of the offer against our rules are as under. \n
|
| 331 |
+
{compliance_html}
|
| 332 |
\n
|
|
|
|
| 333 |
"""
|
| 334 |
yield dd
|
| 335 |
update_log("\n CQ-OEM-Import: "+datetime.now().isoformat()+"\n"+dd+"\n")
|