sxandie commited on
Commit
5fae756
·
1 Parent(s): bd417d4

fix: use relative PRELOADED_ROUTE_PATH, pin gradio==5.15.0 and pydantic<2.11 to stop bool schema crash

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  2. requirements.txt +2 -3
app.py CHANGED
@@ -13,8 +13,9 @@ import src.database as db
13
  os.makedirs("./temp", exist_ok=True)
14
  db.init_db()
15
 
16
- # Preloaded route path
17
- PRELOADED_ROUTE_PATH = r"C:\Users\skushwaha\Documents\hckthn\TrailHead\Routes\track_5-14724236830.gpx"
 
18
 
19
  MAP_HTML_INITIALIZER = """
20
  <div id="trailhead-leaflet-map" style="height: 520px; width: 100%; border:1px solid rgba(245,158,11,0.2); border-radius: 12px; background: #0c1014; z-index: 1;"></div>
 
13
  os.makedirs("./temp", exist_ok=True)
14
  db.init_db()
15
 
16
+ # Preloaded route path — resolve relative to this file for cross-platform compatibility
17
+ _APP_DIR = os.path.dirname(os.path.abspath(__file__))
18
+ PRELOADED_ROUTE_PATH = os.path.join(_APP_DIR, "Routes", "track_5-14724236830.gpx")
19
 
20
  MAP_HTML_INITIALIZER = """
21
  <div id="trailhead-leaflet-map" style="height: 520px; width: 100%; border:1px solid rgba(245,158,11,0.2); border-radius: 12px; background: #0c1014; z-index: 1;"></div>
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- gradio>=5.0.0
2
  pandas
3
  numpy
4
  requests
@@ -6,5 +6,4 @@ huggingface_hub>=0.25.1,<1.0.0
6
  gpxpy
7
  folium
8
  plotly
9
- pywhispercpp
10
- miniaudio
 
1
+ gradio==5.15.0
2
  pandas
3
  numpy
4
  requests
 
6
  gpxpy
7
  folium
8
  plotly
9
+ pydantic>=2.0.0,<2.11.0