Update app.py
Browse files
app.py
CHANGED
|
@@ -89,7 +89,7 @@ def algorithms_cycle_detection():
|
|
| 89 |
edge_tuple = tuple(map(int, edge_tuple))
|
| 90 |
edges.append(edge_tuple)
|
| 91 |
except ValueError:
|
| 92 |
-
st.error(f"Invalid edge format: {edge_str}")
|
| 93 |
return
|
| 94 |
|
| 95 |
if edges:
|
|
@@ -98,7 +98,7 @@ def algorithms_cycle_detection():
|
|
| 98 |
st.write("Custom Graph:", G.edges())
|
| 99 |
plot_cycle_detection(G)
|
| 100 |
else:
|
| 101 |
-
st.error("No valid edges provided.")
|
| 102 |
except Exception as e:
|
| 103 |
st.error(f"Error creating the graph: {e}")
|
| 104 |
else:
|
|
|
|
| 89 |
edge_tuple = tuple(map(int, edge_tuple))
|
| 90 |
edges.append(edge_tuple)
|
| 91 |
except ValueError:
|
| 92 |
+
st.error(f"Invalid edge format: {edge_str}. Ensure both values are integers.")
|
| 93 |
return
|
| 94 |
|
| 95 |
if edges:
|
|
|
|
| 98 |
st.write("Custom Graph:", G.edges())
|
| 99 |
plot_cycle_detection(G)
|
| 100 |
else:
|
| 101 |
+
st.error("No valid edges provided. Please enter edges in the format (a, b), (b, c), etc.")
|
| 102 |
except Exception as e:
|
| 103 |
st.error(f"Error creating the graph: {e}")
|
| 104 |
else:
|