Spaces:
Runtime error
Runtime error
kbberendsen
commited on
Commit
•
d7745f2
1
Parent(s):
4202759
clean code
Browse files- __pycache__/app.cpython-311.pyc +0 -0
- app.py +3 -13
__pycache__/app.cpython-311.pyc
CHANGED
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -1,25 +1,20 @@
|
|
1 |
-
import os
|
2 |
-
#os.environ['MPLCONFIGDIR'] = os.getcwd() + "/configs"
|
3 |
-
|
4 |
from shiny import App, ui, render, reactive
|
5 |
-
from shinywidgets import output_widget, render_widget
|
6 |
import fastf1 as ff1
|
7 |
import matplotlib.pyplot as plt
|
8 |
from matplotlib.collections import LineCollection
|
9 |
from matplotlib import cm
|
10 |
import numpy as np
|
11 |
-
from pathlib import Path
|
12 |
import shiny.experimental as x
|
13 |
import shinyswatch
|
14 |
|
15 |
-
#
|
16 |
cache_path = os.getcwd() + "/cache"
|
|
|
17 |
|
18 |
ff1.Cache.enable_cache(cache_path)
|
19 |
#ff1.Cache.offline_mode(enabled=True)
|
20 |
|
21 |
-
print(f"Cache path: {cache_path}")
|
22 |
-
|
23 |
app_ui = ui.page_fluid(
|
24 |
shinyswatch.theme.minty(),
|
25 |
ui.layout_sidebar(
|
@@ -79,11 +74,6 @@ def server(input, output, session):
|
|
79 |
plt.axis('equal')
|
80 |
plt.tick_params(labelleft=False, left=False, labelbottom=False, bottom=False)
|
81 |
|
82 |
-
##title = plt.suptitle(
|
83 |
-
## f"Fastest Lap Gear Shift Visualization\n"
|
84 |
-
## f"{lap['Driver']} - {f1_session.event['EventName']} {f1_session.event.year}"
|
85 |
-
## )
|
86 |
-
|
87 |
cbar = plt.colorbar(mappable=lc_comp, label="Gear", boundaries=np.arange(1, 10))
|
88 |
cbar.set_ticks(np.arange(1.5, 9.5))
|
89 |
cbar.set_ticklabels(np.arange(1, 9))
|
|
|
1 |
+
import os
|
|
|
|
|
2 |
from shiny import App, ui, render, reactive
|
|
|
3 |
import fastf1 as ff1
|
4 |
import matplotlib.pyplot as plt
|
5 |
from matplotlib.collections import LineCollection
|
6 |
from matplotlib import cm
|
7 |
import numpy as np
|
|
|
8 |
import shiny.experimental as x
|
9 |
import shinyswatch
|
10 |
|
11 |
+
# Define cache folder path
|
12 |
cache_path = os.getcwd() + "/cache"
|
13 |
+
print(f"Cache path: {cache_path}")
|
14 |
|
15 |
ff1.Cache.enable_cache(cache_path)
|
16 |
#ff1.Cache.offline_mode(enabled=True)
|
17 |
|
|
|
|
|
18 |
app_ui = ui.page_fluid(
|
19 |
shinyswatch.theme.minty(),
|
20 |
ui.layout_sidebar(
|
|
|
74 |
plt.axis('equal')
|
75 |
plt.tick_params(labelleft=False, left=False, labelbottom=False, bottom=False)
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
cbar = plt.colorbar(mappable=lc_comp, label="Gear", boundaries=np.arange(1, 10))
|
78 |
cbar.set_ticks(np.arange(1.5, 9.5))
|
79 |
cbar.set_ticklabels(np.arange(1, 9))
|