Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ from langchain_core.runnables import RunnablePassthrough
|
|
| 16 |
from langchain_core.output_parsers import StrOutputParser
|
| 17 |
|
| 18 |
from manabUtils import retrieve_chunks
|
| 19 |
-
from technicalDocCompliance import compliance_tech
|
| 20 |
from MyRules import manualRules
|
| 21 |
|
| 22 |
os.environ["HF_TOKEN"] = os.getenv("HF_TOKEN")
|
|
@@ -297,10 +297,10 @@ def check_compliance(file): # FIXED: now streams
|
|
| 297 |
yield from loop_function(df1) # FIXED: delegate yields
|
| 298 |
else:
|
| 299 |
yield "Unsupported file format"
|
| 300 |
-
def check_compliance_tech(
|
| 301 |
if file.name.endswith(".pdf"):
|
| 302 |
MANUAL_RULES = manualRules()
|
| 303 |
-
dd=
|
| 304 |
kkk="<table>"
|
| 305 |
kkk+=generate_html(dd)
|
| 306 |
kkk+="</table>"
|
|
|
|
| 16 |
from langchain_core.output_parsers import StrOutputParser
|
| 17 |
|
| 18 |
from manabUtils import retrieve_chunks
|
| 19 |
+
from technicalDocCompliance import compliance_tech, compliance_tech_pdf
|
| 20 |
from MyRules import manualRules
|
| 21 |
|
| 22 |
os.environ["HF_TOKEN"] = os.getenv("HF_TOKEN")
|
|
|
|
| 297 |
yield from loop_function(df1) # FIXED: delegate yields
|
| 298 |
else:
|
| 299 |
yield "Unsupported file format"
|
| 300 |
+
def check_compliance_tech(file_name):
|
| 301 |
if file.name.endswith(".pdf"):
|
| 302 |
MANUAL_RULES = manualRules()
|
| 303 |
+
dd=compliance_tech_pdf(file_name, client, MANUAL_RULES)
|
| 304 |
kkk="<table>"
|
| 305 |
kkk+=generate_html(dd)
|
| 306 |
kkk+="</table>"
|