eshan6704 commited on
Commit
ec1034e
·
verified ·
1 Parent(s): a17c5b4

Update app/app.py

Browse files
Files changed (1) hide show
  1. app/app.py +9 -22
app/app.py CHANGED
@@ -5,31 +5,18 @@ import os
5
  import importlib.util
6
 
7
  # -------------------------------------------------------
8
- # Explicit module loader (HF-safe)
9
- # -------------------------------------------------------
10
- BASE_DIR = os.path.dirname(os.path.abspath(__file__))
11
-
12
- def load_module(name):
13
- path = os.path.join(BASE_DIR, f"{name}.py")
14
- if not os.path.exists(path):
15
- raise ImportError(f"Module file not found: {path}")
16
-
17
- spec = importlib.util.spec_from_file_location(name, path)
18
- module = importlib.util.module_from_spec(spec)
19
- spec.loader.exec_module(module)
20
- return module
21
-
22
  # -------------------------------------------------------
23
  # Load ALL local modules explicitly
24
  # -------------------------------------------------------
25
- common = load_module("common")
26
- stock = load_module("stock")
27
- indices_html = load_module("indices_html")
28
- index_live_html = load_module("index_live_html")
29
- preopen_html = load_module("preopen_html")
30
- eq_html = load_module("eq_html")
31
- bhavcopy_html = load_module("bhavcopy_html")
32
- build_nse_fno = load_module("build_nse_fno")
33
 
34
  # External libs (installed via requirements.txt)
35
  import nsepython
 
5
  import importlib.util
6
 
7
  # -------------------------------------------------------
8
+ #
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # -------------------------------------------------------
10
  # Load ALL local modules explicitly
11
  # -------------------------------------------------------
12
+ from . import common
13
+ from . import stock
14
+ from . import indices_html
15
+ from . import index_live_html
16
+ from . import preopen_html
17
+ from . import eq_html
18
+ from . import bhavcopy_html
19
+ from . import build_nse_fno
20
 
21
  # External libs (installed via requirements.txt)
22
  import nsepython