Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
|
|
|
| 3 |
from openai import OpenAI
|
| 4 |
import pandas as pd
|
| 5 |
from docx import Document
|
|
@@ -21,6 +22,7 @@ from MyRules import manualRules
|
|
| 21 |
from manabCQgenetaion import compliance_import_OEM
|
| 22 |
|
| 23 |
|
|
|
|
| 24 |
os.environ["HF_TOKEN"] = os.getenv("HF_TOKEN")
|
| 25 |
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
|
| 26 |
|
|
@@ -66,6 +68,7 @@ PQC_rules="""
|
|
| 66 |
10. PQC should be clarified in tender documents that authenticated documents are required.
|
| 67 |
11. Adequacy of competition must be evaluated while framing PQC.
|
| 68 |
12. PQC should balance inclusion of capable vendors and exclusion of incapable ones."""
|
|
|
|
| 69 |
#===========================
|
| 70 |
retriever = retrieve_chunks(repo_id)
|
| 71 |
def create_qa_chain():
|
|
@@ -321,6 +324,7 @@ def generateCqOemImport(file_name):
|
|
| 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")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
+
|
| 4 |
from openai import OpenAI
|
| 5 |
import pandas as pd
|
| 6 |
from docx import Document
|
|
|
|
| 22 |
from manabCQgenetaion import compliance_import_OEM
|
| 23 |
|
| 24 |
|
| 25 |
+
|
| 26 |
os.environ["HF_TOKEN"] = os.getenv("HF_TOKEN")
|
| 27 |
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
|
| 28 |
|
|
|
|
| 68 |
10. PQC should be clarified in tender documents that authenticated documents are required.
|
| 69 |
11. Adequacy of competition must be evaluated while framing PQC.
|
| 70 |
12. PQC should balance inclusion of capable vendors and exclusion of incapable ones."""
|
| 71 |
+
|
| 72 |
#===========================
|
| 73 |
retriever = retrieve_chunks(repo_id)
|
| 74 |
def create_qa_chain():
|
|
|
|
| 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")
|