Spaces:
Sleeping
Sleeping
Added session work
Browse files
app.py
CHANGED
@@ -1,27 +1,21 @@
|
|
1 |
import os
|
|
|
2 |
from git import Repo
|
|
|
3 |
|
4 |
GITHUB_PAT = os.getenv("GITHUB_PAT")
|
5 |
-
|
6 |
REPO_URL = f"https://YOUR_USERNAME:{GITHUB_PAT}@github.com/aaronmat1905/DataCraftorSecured.git"
|
7 |
-
REPO_DIRECTORY = "./DataCraftorSecured"
|
8 |
|
9 |
try:
|
10 |
Repo.clone_from(REPO_URL, REPO_DIRECTORY)
|
11 |
-
|
12 |
import sys
|
13 |
-
sys.path.append(REPO_DIRECTORY)
|
14 |
-
|
15 |
-
import config
|
16 |
-
import interface
|
17 |
-
import chatbot
|
18 |
-
import data_utils
|
19 |
-
|
20 |
except Exception as e:
|
21 |
print(f"An error occurred: {e}")
|
22 |
|
23 |
-
|
24 |
|
25 |
if __name__ == "__main__":
|
26 |
-
demo = build_interface()
|
27 |
demo.launch()
|
|
|
1 |
import os
|
2 |
+
import uuid
|
3 |
from git import Repo
|
4 |
+
from interface import build_interface, data_model
|
5 |
|
6 |
GITHUB_PAT = os.getenv("GITHUB_PAT")
|
|
|
7 |
REPO_URL = f"https://YOUR_USERNAME:{GITHUB_PAT}@github.com/aaronmat1905/DataCraftorSecured.git"
|
8 |
+
REPO_DIRECTORY = "./DataCraftorSecured"
|
9 |
|
10 |
try:
|
11 |
Repo.clone_from(REPO_URL, REPO_DIRECTORY)
|
|
|
12 |
import sys
|
13 |
+
sys.path.append(REPO_DIRECTORY)
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
except Exception as e:
|
15 |
print(f"An error occurred: {e}")
|
16 |
|
17 |
+
session_id = uuid.uuid4()
|
18 |
|
19 |
if __name__ == "__main__":
|
20 |
+
demo = build_interface(session_id)
|
21 |
demo.launch()
|