Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ import os
|
|
5 |
import time
|
6 |
import re
|
7 |
import json
|
|
|
|
|
|
|
8 |
from auditqa.sample_questions import QUESTIONS
|
9 |
from auditqa.engine.prompts import audience_prompts
|
10 |
from auditqa.reports import files, report_list
|
@@ -24,6 +27,16 @@ from dotenv import load_dotenv
|
|
24 |
import pkg_resources
|
25 |
load_dotenv()
|
26 |
HF_token = os.environ["HF_TOKEN"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
#installed_packages = pkg_resources.working_set
|
28 |
#package_list_ = ""
|
29 |
#for package in installed_packages:
|
|
|
5 |
import time
|
6 |
import re
|
7 |
import json
|
8 |
+
import uuid
|
9 |
+
from pathlib import Path
|
10 |
+
from huggingface_hub import CommitScheduler
|
11 |
from auditqa.sample_questions import QUESTIONS
|
12 |
from auditqa.engine.prompts import audience_prompts
|
13 |
from auditqa.reports import files, report_list
|
|
|
27 |
import pkg_resources
|
28 |
load_dotenv()
|
29 |
HF_token = os.environ["HF_TOKEN"]
|
30 |
+
JSON_DATASET_DIR = Path("json_dataset")
|
31 |
+
JSON_DATASET_DIR.mkdir(parents=True, exist_ok=True)
|
32 |
+
JSON_DATASET_PATH = JSON_DATASET_DIR / f"logs-{uuid4()}.json"
|
33 |
+
|
34 |
+
scheduler = CommitScheduler(
|
35 |
+
repo_id="GIZ/audit_chatbot",
|
36 |
+
repo_type="dataset",
|
37 |
+
folder_path=JSON_DATASET_DIR,
|
38 |
+
path_in_repo="audit_chatbot",
|
39 |
+
)
|
40 |
#installed_packages = pkg_resources.working_set
|
41 |
#package_list_ = ""
|
42 |
#for package in installed_packages:
|