Spaces:
Sleeping
Sleeping
init
Browse files
app.py
CHANGED
|
@@ -3,29 +3,22 @@ import uuid
|
|
| 3 |
from git import Repo
|
| 4 |
|
| 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 |
-
|
| 11 |
try:
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
import sys
|
| 16 |
sys.path.append(REPO_DIRECTORY)
|
| 17 |
-
|
| 18 |
-
import config
|
| 19 |
import interface
|
| 20 |
-
import chatbot
|
| 21 |
-
import data_utils
|
| 22 |
except Exception as e:
|
| 23 |
print(f"An error occurred: {e}")
|
| 24 |
-
|
| 25 |
from interface import build_interface, data_model
|
| 26 |
-
|
| 27 |
session_id = str(uuid.uuid4())
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
demo = build_interface(session_id)
|
| 31 |
-
demo.launch()
|
|
|
|
| 3 |
from git import Repo
|
| 4 |
|
| 5 |
|
| 6 |
+
# Retrieve GitHub personal access token and configure repository URL
|
| 7 |
GITHUB_PAT = os.getenv("GITHUB_PAT")
|
| 8 |
REPO_URL = f"https://YOUR_USERNAME:{GITHUB_PAT}@github.com/aaronmat1905/DataCraftorSecured.git"
|
| 9 |
REPO_DIRECTORY = "./DataCraftorSecured"
|
| 10 |
|
|
|
|
| 11 |
try:
|
| 12 |
+
# Clone the repository and set up imports
|
| 13 |
+
Repo.clone_from(REPO_URL, REPO_DIRECTORY)
|
|
|
|
| 14 |
import sys
|
| 15 |
sys.path.append(REPO_DIRECTORY)
|
|
|
|
|
|
|
| 16 |
import interface
|
|
|
|
|
|
|
| 17 |
except Exception as e:
|
| 18 |
print(f"An error occurred: {e}")
|
|
|
|
| 19 |
from interface import build_interface, data_model
|
|
|
|
| 20 |
session_id = str(uuid.uuid4())
|
| 21 |
|
| 22 |
if __name__ == "__main__":
|
| 23 |
demo = build_interface(session_id)
|
| 24 |
+
demo.launch()
|