Fix package setup
Browse files- src/pips/gradio_app.py +7 -4
src/pips/gradio_app.py
CHANGED
|
@@ -21,7 +21,10 @@ import os
|
|
| 21 |
import tempfile
|
| 22 |
import time
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
SAVED_RUNS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "saved_examples"))
|
| 27 |
|
|
@@ -34,9 +37,9 @@ except ImportError as exc: # pragma: no cover - handled at runtime
|
|
| 34 |
"Install it via `pip install gradio`."
|
| 35 |
) from exc
|
| 36 |
|
| 37 |
-
from pips.core import PIPSSolver
|
| 38 |
-
from pips.models import AVAILABLE_MODELS, get_model
|
| 39 |
-
from pips.utils import RawInput
|
| 40 |
|
| 41 |
|
| 42 |
# ---------------------------------------------------------------------------
|
|
|
|
| 21 |
import tempfile
|
| 22 |
import time
|
| 23 |
|
| 24 |
+
from pathlib import Path
|
| 25 |
+
import sys
|
| 26 |
+
path_root = Path(__file__).parents[2]
|
| 27 |
+
sys.path.append(str(path_root))
|
| 28 |
|
| 29 |
SAVED_RUNS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "saved_examples"))
|
| 30 |
|
|
|
|
| 37 |
"Install it via `pip install gradio`."
|
| 38 |
) from exc
|
| 39 |
|
| 40 |
+
from src.pips.core import PIPSSolver
|
| 41 |
+
from src.pips.models import AVAILABLE_MODELS, get_model
|
| 42 |
+
from src.pips.utils import RawInput
|
| 43 |
|
| 44 |
|
| 45 |
# ---------------------------------------------------------------------------
|