ifw-arz commited on
Commit
7b5e845
1 Parent(s): 6b454c6
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -12,14 +12,15 @@ def main():
12
  if uploaded_file is not None:
13
  try:
14
  df = pd.read_csv(uploaded_file)
15
- mittelwert = st.slider("Gleitender Mittelwert", 0, 1000, 0, 10)
16
  except pd.errors.EmptyDataError:
17
  st.error("Fehler: Leere CSV Datei")
18
  except Exception as e:
19
  st.error(f"Error: {str(e)}")
20
 
21
- while uploaded_file is not None:
22
-
 
23
  time_column = st.selectbox("Zeit auswählen", df.columns, index=0)
24
  data_column = st.selectbox("Daten auswählen", df.columns)
25
 
@@ -27,8 +28,8 @@ def main():
27
  fig = plotly_plot(df, time_column, data_column, mittelwert)
28
  fig.update_layout(width = 1600, height = 600)
29
  st.plotly_chart(fig)
30
- except:
31
- pass
32
 
33
 
34
  if __name__ == "__main__":
 
12
  if uploaded_file is not None:
13
  try:
14
  df = pd.read_csv(uploaded_file)
15
+
16
  except pd.errors.EmptyDataError:
17
  st.error("Fehler: Leere CSV Datei")
18
  except Exception as e:
19
  st.error(f"Error: {str(e)}")
20
 
21
+ if uploaded_file is not None:
22
+
23
+ mittelwert = st.slider("Gleitender Mittelwert", 0, 1000, 0, 10)
24
  time_column = st.selectbox("Zeit auswählen", df.columns, index=0)
25
  data_column = st.selectbox("Daten auswählen", df.columns)
26
 
 
28
  fig = plotly_plot(df, time_column, data_column, mittelwert)
29
  fig.update_layout(width = 1600, height = 600)
30
  st.plotly_chart(fig)
31
+ except Exception as e:
32
+ st.error(f"Error: {str(e)}")
33
 
34
 
35
  if __name__ == "__main__":