joel-woodfield commited on
Commit
d518d87
·
1 Parent(s): aefe386

Refactor file structure

Browse files
README.md CHANGED
@@ -5,8 +5,8 @@ colorFrom: yellow
5
  colorTo: gray
6
  sdk: gradio
7
  sdk_version: 6.3.0
8
- app_file: frontend.py
9
  pinned: false
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
5
  colorTo: gray
6
  sdk: gradio
7
  sdk_version: 6.3.0
8
+ app_file: frontends/gradio/main.py
9
  pinned: false
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
backend/src/__pycache__/backend.cpython-312.pyc ADDED
Binary file (12.7 kB). View file
 
backend.py → backend/src/backend.py RENAMED
File without changes
frontend.py → frontends/gradio/main.py RENAMED
@@ -8,6 +8,13 @@ import matplotlib.lines as mlines
8
  import numpy as np
9
  from sympy import sympify
10
 
 
 
 
 
 
 
 
11
  from backend import (
12
  compute_plot_values,
13
  generate_dataset,
 
8
  import numpy as np
9
  from sympy import sympify
10
 
11
+ import sys
12
+ from pathlib import Path
13
+ root_dir = Path(__file__).resolve().parent.parent.parent
14
+ backend_src = root_dir / "backend" / "src"
15
+ if str(backend_src) not in sys.path:
16
+ sys.path.append(str(backend_src))
17
+
18
  from backend import (
19
  compute_plot_values,
20
  generate_dataset,