Upload 15 files
Browse files- app.py +3 -3
- pipeline/orchestrator.py +4 -4
app.py
CHANGED
|
@@ -452,7 +452,7 @@ with gr.Blocks() as app:
|
|
| 452 |
with gr.Tab("Database Sync"):
|
| 453 |
gr.Markdown("Sync (Add) new API keys and YouTube Links into your database.")
|
| 454 |
with gr.Row():
|
| 455 |
-
sync_db_input = gr.Textbox(label="DB Path", value="/data/
|
| 456 |
with gr.Row():
|
| 457 |
api_keys_input = gr.Textbox(label="API Keys (One per line)", lines=5)
|
| 458 |
links_input = gr.Textbox(label="YouTube Links (One per line)", lines=5)
|
|
@@ -464,7 +464,7 @@ with gr.Blocks() as app:
|
|
| 464 |
|
| 465 |
with gr.Tab("FastAPI Workers"):
|
| 466 |
with gr.Row():
|
| 467 |
-
db_input = gr.Textbox(label="DB Path", value="/data/
|
| 468 |
workers_input = gr.Textbox(label="Worker URLs (comma separated)", placeholder="http://localhost:7860, https://your-worker.hf.space")
|
| 469 |
links_per_worker = gr.Number(label="Links per worker", value=2)
|
| 470 |
|
|
@@ -477,7 +477,7 @@ with gr.Blocks() as app:
|
|
| 477 |
gr.Markdown("Trigger simple Kaggle notebook workers. Note: You must mount `kaggle.json` to `~/.kaggle/kaggle.json` in the container for this to work.")
|
| 478 |
|
| 479 |
with gr.Row():
|
| 480 |
-
k_db_input = gr.Textbox(label="DB Path", value="/data/
|
| 481 |
k_links_per_worker = gr.Number(label="Links per worker", value=2)
|
| 482 |
k_max_workers = gr.Number(label="Max Workers", value=5)
|
| 483 |
|
|
|
|
| 452 |
with gr.Tab("Database Sync"):
|
| 453 |
gr.Markdown("Sync (Add) new API keys and YouTube Links into your database.")
|
| 454 |
with gr.Row():
|
| 455 |
+
sync_db_input = gr.Textbox(label="DB Path", value="/data/accounts.db")
|
| 456 |
with gr.Row():
|
| 457 |
api_keys_input = gr.Textbox(label="API Keys (One per line)", lines=5)
|
| 458 |
links_input = gr.Textbox(label="YouTube Links (One per line)", lines=5)
|
|
|
|
| 464 |
|
| 465 |
with gr.Tab("FastAPI Workers"):
|
| 466 |
with gr.Row():
|
| 467 |
+
db_input = gr.Textbox(label="DB Path", value="/data/accounts.db")
|
| 468 |
workers_input = gr.Textbox(label="Worker URLs (comma separated)", placeholder="http://localhost:7860, https://your-worker.hf.space")
|
| 469 |
links_per_worker = gr.Number(label="Links per worker", value=2)
|
| 470 |
|
|
|
|
| 477 |
gr.Markdown("Trigger simple Kaggle notebook workers. Note: You must mount `kaggle.json` to `~/.kaggle/kaggle.json` in the container for this to work.")
|
| 478 |
|
| 479 |
with gr.Row():
|
| 480 |
+
k_db_input = gr.Textbox(label="DB Path", value="/data/accounts.db")
|
| 481 |
k_links_per_worker = gr.Number(label="Links per worker", value=2)
|
| 482 |
k_max_workers = gr.Number(label="Max Workers", value=5)
|
| 483 |
|
pipeline/orchestrator.py
CHANGED
|
@@ -27,10 +27,10 @@ logging.basicConfig(
|
|
| 27 |
log = logging.getLogger("orchestrator")
|
| 28 |
|
| 29 |
# ββ paths & constants ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 30 |
-
BASE_DIR =
|
| 31 |
-
DB_ACCOUNTS =
|
| 32 |
-
DB_CHANNELS =
|
| 33 |
-
DB_TRACKER =
|
| 34 |
WORKERS_DIR = BASE_DIR / "kaggle_workers"
|
| 35 |
WORKER_SCRIPT = Path(__file__).resolve().parent / "worker.py"
|
| 36 |
HF_REPO = "AdhyanshVerma/YT"
|
|
|
|
| 27 |
log = logging.getLogger("orchestrator")
|
| 28 |
|
| 29 |
# ββ paths & constants ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 30 |
+
BASE_DIR = Path(__file__).resolve().parent.parent
|
| 31 |
+
DB_ACCOUNTS = Path("/data/accounts.db")
|
| 32 |
+
DB_CHANNELS = Path("/data/channel_links.db")
|
| 33 |
+
DB_TRACKER = Path("/data/tracker.db")
|
| 34 |
WORKERS_DIR = BASE_DIR / "kaggle_workers"
|
| 35 |
WORKER_SCRIPT = Path(__file__).resolve().parent / "worker.py"
|
| 36 |
HF_REPO = "AdhyanshVerma/YT"
|