SSEONG commited on
Commit
867c191
ยท
verified ยท
1 Parent(s): 40b4fe1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -82,7 +82,7 @@ def template_matching(region, templates):
82
  print(f"Error matching template {num}: {e}")
83
  continue
84
 
85
- if best_score > 0.7:
86
  return best_match
87
  else:
88
  return 0
@@ -121,7 +121,7 @@ def find_items(img_array, color_range, templates):
121
  def process_image(img, templates):
122
  st.image(cv2.cvtColor(img, cv2.COLOR_BGR2RGB), caption='์—…๋กœ๋“œ๋œ ์ด๋ฏธ์ง€', use_container_width=True)
123
 
124
- with st.spinner('์•„์ดํ…œ ๊ฐœ์ˆ˜๋ฅผ ์„ธ๋Š” ์ค‘... (์ฒ˜์Œ ์‹คํ–‰์‹œ ๋ชจ๋ธ ๋กœ๋”ฉ์œผ๋กœ ์‹œ๊ฐ„์ด ๊ฑธ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค)'):
125
  try:
126
  results = find_items(img, color_ranges, templates)
127
 
@@ -173,10 +173,10 @@ def process_image(img, templates):
173
 
174
 
175
  # Streamlit UI
176
- st.set_page_config(page_title="๊ฒŒ์ž„ ์•„์ดํ…œ ์นด์šดํ„ฐ", page_icon="๐ŸŽฎ")
177
 
178
- st.title('๐ŸŽฎ ๊ฒŒ์ž„ ์•„์ดํ…œ ์นด์šดํ„ฐ')
179
- st.write('ํš๋“ํ•œ ์†์„ฑ ์•„์ดํ…œ ๊ฐœ์ˆ˜๋ฅผ ์ž๋™์œผ๋กœ ์„ธ์–ด๋“œ๋ฆฝ๋‹ˆ๋‹ค!')
180
 
181
  templates = load_number_templates()
182
 
 
82
  print(f"Error matching template {num}: {e}")
83
  continue
84
 
85
+ if best_score > 0.65:
86
  return best_match
87
  else:
88
  return 0
 
121
  def process_image(img, templates):
122
  st.image(cv2.cvtColor(img, cv2.COLOR_BGR2RGB), caption='์—…๋กœ๋“œ๋œ ์ด๋ฏธ์ง€', use_container_width=True)
123
 
124
+ with st.spinner('์•„์ดํ…œ ๊ฐœ์ˆ˜๋ฅผ ์„ธ๋Š” ์ค‘...'):
125
  try:
126
  results = find_items(img, color_ranges, templates)
127
 
 
173
 
174
 
175
  # Streamlit UI
176
+ st.set_page_config(page_title="์†์„ฑ ์ž ์žฌ๋ ฅ ์ฃผ๋ฌธ์„œ ์นด์šดํ„ฐ", page_icon="๐ŸŽฎ")
177
 
178
+ st.title('๐ŸŽฎ ์†์„ฑ ์ž ์žฌ๋ ฅ ์ฃผ๋ฌธ์„œ ์นด์šดํ„ฐ')
179
+ st.write('ํš๋“ํ•œ ์†์„ฑ ์ž ์žฌ๋ ฅ ์ฃผ๋ฌธ์„œ ๊ฐœ์ˆ˜๋ฅผ ์ž๋™์œผ๋กœ ์„ธ์–ด๋“œ๋ฆฝ๋‹ˆ๋‹ค!')
180
 
181
  templates = load_number_templates()
182