Spaces:
Runtime error
Runtime error
fix dup issue
Browse files
app.py
CHANGED
@@ -38,9 +38,12 @@ def load_data(n):
|
|
38 |
|
39 |
def is_duplicate(s):
|
40 |
# st.write(s)
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
44 |
return res
|
45 |
|
46 |
# if "count" not in st.session_state:
|
@@ -93,11 +96,12 @@ with col2:
|
|
93 |
|
94 |
with placeholder.container():
|
95 |
if graph_type == 'Line':
|
96 |
-
st.
|
97 |
elif graph_type == 'Bar':
|
98 |
st.bar_chart(chart_data)
|
99 |
# st.bar_chart(chart_data["data"], y = chart_data["label"])
|
100 |
# st.map(df)
|
101 |
st.write(df)
|
102 |
-
time.sleep(
|
|
|
103 |
# st.session_state["count"] += 1
|
|
|
38 |
|
39 |
def is_duplicate(s):
|
40 |
# st.write(s)
|
41 |
+
if st.session_state["duplicates"]:
|
42 |
+
check_candidate = (s["Id"], s["Time"])
|
43 |
+
res = check_candidate in st.session_state["duplicates"]
|
44 |
+
st.session_state["duplicates"].add(check_candidate)
|
45 |
+
else:
|
46 |
+
st.session_state["duplicates"] = set()
|
47 |
return res
|
48 |
|
49 |
# if "count" not in st.session_state:
|
|
|
96 |
|
97 |
with placeholder.container():
|
98 |
if graph_type == 'Line':
|
99 |
+
st.line_chart(chart_data)
|
100 |
elif graph_type == 'Bar':
|
101 |
st.bar_chart(chart_data)
|
102 |
# st.bar_chart(chart_data["data"], y = chart_data["label"])
|
103 |
# st.map(df)
|
104 |
st.write(df)
|
105 |
+
time.sleep(2)
|
106 |
+
# st.write(st.session_state)
|
107 |
# st.session_state["count"] += 1
|