Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
| 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="
|
| 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 |
|