joshnavip commited on
Commit
045661d
·
1 Parent(s): 9472d63

Fix reflex_ui import path for Hugging Face deployment

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -21,7 +21,11 @@ _reflex_pkg_parent = REPO_ROOT / "reflex_ui"
21
  if str(_reflex_pkg_parent) not in sys.path:
22
  sys.path.insert(0, str(_reflex_pkg_parent))
23
 
24
- from reflex_ui.backend_bridge import run_prediction # noqa: E402
 
 
 
 
25
 
26
 
27
  def _predict(code: str, language: str, top_k: float):
 
21
  if str(_reflex_pkg_parent) not in sys.path:
22
  sys.path.insert(0, str(_reflex_pkg_parent))
23
 
24
+ _reflex_pkg_nested = _reflex_pkg_parent / "reflex_ui"
25
+ if str(_reflex_pkg_nested) not in sys.path:
26
+ sys.path.insert(0, str(_reflex_pkg_nested))
27
+
28
+ from backend_bridge import run_prediction # noqa: E402
29
 
30
 
31
  def _predict(code: str, language: str, top_k: float):