Spaces:
Sleeping
Sleeping
Commit
·
143b687
1
Parent(s):
4360d4c
Update app.py
Browse files
app.py
CHANGED
@@ -168,6 +168,7 @@ def main():
|
|
168 |
|
169 |
if uploaded_file is not None:
|
170 |
col1, col2 = st.columns(2)
|
|
|
171 |
puzzle = Image.open(uploaded_file)
|
172 |
col1.image(puzzle, use_column_width=True)
|
173 |
puzzle = np.asarray(puzzle)
|
@@ -203,13 +204,14 @@ def main():
|
|
203 |
solve(grid)
|
204 |
|
205 |
# Display the solution or appropriate message
|
206 |
-
|
207 |
-
|
|
|
208 |
st.subheader("Sudoku Solved:")
|
209 |
-
|
210 |
|
211 |
-
|
212 |
-
|
213 |
|
214 |
if __name__ == '__main__':
|
215 |
main()
|
|
|
168 |
|
169 |
if uploaded_file is not None:
|
170 |
col1, col2 = st.columns(2)
|
171 |
+
col1.subheader("Sudoku Puzzle")
|
172 |
puzzle = Image.open(uploaded_file)
|
173 |
col1.image(puzzle, use_column_width=True)
|
174 |
puzzle = np.asarray(puzzle)
|
|
|
204 |
solve(grid)
|
205 |
|
206 |
# Display the solution or appropriate message
|
207 |
+
with col2:
|
208 |
+
if solve(grid):
|
209 |
+
|
210 |
st.subheader("Sudoku Solved:")
|
211 |
+
st.table(grid)
|
212 |
|
213 |
+
else:
|
214 |
+
st.write("No solution found.")
|
215 |
|
216 |
if __name__ == '__main__':
|
217 |
main()
|