Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -312,7 +312,16 @@ def check_compliance_tech(file_name):
|
|
| 312 |
yield "Unsupported file format"
|
| 313 |
def generateCqOemImport(file_name):
|
| 314 |
if file_name.name.endswith(".pdf"):
|
| 315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
yield dd
|
| 317 |
update_log("\n CQ-OEM-Import: "+datetime.now().isoformat()+"\n"+dd+"\n")
|
| 318 |
else:
|
|
|
|
| 312 |
yield "Unsupported file format"
|
| 313 |
def generateCqOemImport(file_name):
|
| 314 |
if file_name.name.endswith(".pdf"):
|
| 315 |
+
finalHtml,input_tokens,output_tokens,total_tokens,result_dic = compliance_import_OEM(file_name, client)
|
| 316 |
+
dd=f"""
|
| 317 |
+
\n
|
| 318 |
+
<table>
|
| 319 |
+
<tr><td>Input tokens:</td><td>{input_tokens}</td></tr>
|
| 320 |
+
<tr><td>Output tokens:</td><td>{output_tokens}</td></tr>
|
| 321 |
+
<tr><td>Total tokens:</td><td>{total_tokens}</td></tr>
|
| 322 |
+
</table>
|
| 323 |
+
\n
|
| 324 |
+
"""
|
| 325 |
yield dd
|
| 326 |
update_log("\n CQ-OEM-Import: "+datetime.now().isoformat()+"\n"+dd+"\n")
|
| 327 |
else:
|