wayne-chi commited on
Commit
d07bc21
·
verified ·
1 Parent(s): 200bf36

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +11 -1
src/streamlit_app.py CHANGED
@@ -5,6 +5,7 @@ import matplotlib.pyplot as plt
5
  import plotly.express as px
6
  import numpy as np
7
  import plotly.graph_objects as go
 
8
  # from blend_logic import run_dummy_prediction
9
 
10
  ##---- fucntions ------
@@ -12,7 +13,16 @@ import pandas as pd
12
  import streamlit as st
13
 
14
  # Load fuel data from CSV (create this file if it doesn't exist)
15
- FUEL_CSV_PATH = "fuel_properties.csv"
 
 
 
 
 
 
 
 
 
16
 
17
  def load_fuel_data():
18
  """Load fuel data from CSV or create default if not exists"""
 
5
  import plotly.express as px
6
  import numpy as np
7
  import plotly.graph_objects as go
8
+ import shutil
9
  # from blend_logic import run_dummy_prediction
10
 
11
  ##---- fucntions ------
 
13
  import streamlit as st
14
 
15
  # Load fuel data from CSV (create this file if it doesn't exist)
16
+
17
+ SRC_CSV_PATH = os.path.join(os.path.dirname(__file__), "fuel_properties.csv")
18
+
19
+ # Writable path (e.g., /tmp or home dir)
20
+ FUEL_CSV_PATH = os.path.join("/tmp", "fuel_properties.csv")
21
+
22
+ # If not already copied, copy it over
23
+ if not os.path.exists(FUEL_CSV_PATH):
24
+ shutil.copy(SRC_CSV_PATH, FUEL_CSV_PATH)
25
+
26
 
27
  def load_fuel_data():
28
  """Load fuel data from CSV or create default if not exists"""