Upload folder using huggingface_hub
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +4 -2
__pycache__/app.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
|
app.py
CHANGED
|
@@ -3,7 +3,6 @@ from __future__ import annotations
|
|
| 3 |
import csv
|
| 4 |
import os
|
| 5 |
import tempfile
|
| 6 |
-
import threading
|
| 7 |
from pathlib import Path
|
| 8 |
from typing import Any
|
| 9 |
|
|
@@ -22,6 +21,7 @@ from space_runtime import (
|
|
| 22 |
MODEL_REPO_ID = os.getenv("MODEL_REPO_ID", "lighteternal/BioAssayAlign-Qwen3-Embedding-0.6B-Compatibility")
|
| 23 |
MAX_INPUT_SMILES = int(os.getenv("MAX_INPUT_SMILES", "3000"))
|
| 24 |
DEFAULT_TOP_K = int(os.getenv("DEFAULT_TOP_K", "50"))
|
|
|
|
| 25 |
|
| 26 |
CSS = """
|
| 27 |
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');
|
|
@@ -954,7 +954,9 @@ with gr.Blocks(title="BioAssayAlign Compatibility Explorer", analytics_enabled=F
|
|
| 954 |
)
|
| 955 |
|
| 956 |
if __name__ == "__main__":
|
| 957 |
-
|
|
|
|
|
|
|
| 958 |
demo.queue(default_concurrency_limit=4).launch(
|
| 959 |
show_error=True,
|
| 960 |
quiet=True,
|
|
|
|
| 3 |
import csv
|
| 4 |
import os
|
| 5 |
import tempfile
|
|
|
|
| 6 |
from pathlib import Path
|
| 7 |
from typing import Any
|
| 8 |
|
|
|
|
| 21 |
MODEL_REPO_ID = os.getenv("MODEL_REPO_ID", "lighteternal/BioAssayAlign-Qwen3-Embedding-0.6B-Compatibility")
|
| 22 |
MAX_INPUT_SMILES = int(os.getenv("MAX_INPUT_SMILES", "3000"))
|
| 23 |
DEFAULT_TOP_K = int(os.getenv("DEFAULT_TOP_K", "50"))
|
| 24 |
+
ENABLE_BACKGROUND_WARMUP = os.getenv("ENABLE_BACKGROUND_WARMUP", "0") == "1"
|
| 25 |
|
| 26 |
CSS = """
|
| 27 |
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');
|
|
|
|
| 954 |
)
|
| 955 |
|
| 956 |
if __name__ == "__main__":
|
| 957 |
+
if ENABLE_BACKGROUND_WARMUP:
|
| 958 |
+
import threading
|
| 959 |
+
threading.Thread(target=_warm_model_background, daemon=True).start()
|
| 960 |
demo.queue(default_concurrency_limit=4).launch(
|
| 961 |
show_error=True,
|
| 962 |
quiet=True,
|