Narendra9009 commited on
Commit
4079f62
·
verified ·
1 Parent(s): 1f5475a

optimizing the code by removing redundant part

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -110,9 +110,10 @@ def main():
110
 
111
 
112
 
113
- result = CLIENT.infer(temp_file_path, model_id="chessboard-segmentation/1")
114
-
115
  image = cv2.imread(temp_file_path)
 
 
 
116
 
117
  if image is None:
118
  st.write("Error: Image not loaded.")
@@ -211,8 +212,8 @@ def main():
211
  stockfish_path = os.path.join(os.getcwd(), "stockfish-ubuntu-x86-64-sse41-popcnt")
212
  stockfish = Stockfish(
213
  path=stockfish_path,
214
- depth=15,
215
- parameters={"Threads": 2, "Minimum Thinking Time": 30}
216
  )
217
 
218
  # Predict the next move
 
110
 
111
 
112
 
 
 
113
  image = cv2.imread(temp_file_path)
114
+ image = cv2.resize(image, (512, 512))
115
+
116
+ result = CLIENT.infer(image, model_id="chessboard-segmentation/1")
117
 
118
  if image is None:
119
  st.write("Error: Image not loaded.")
 
212
  stockfish_path = os.path.join(os.getcwd(), "stockfish-ubuntu-x86-64-sse41-popcnt")
213
  stockfish = Stockfish(
214
  path=stockfish_path,
215
+ depth=10,
216
+ parameters={"Threads": 2, "Minimum Thinking Time": 2}
217
  )
218
 
219
  # Predict the next move