Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from PIL import Image
|
|
4 |
|
5 |
import cv2
|
6 |
|
7 |
-
def decode(im):
|
8 |
img = cv2.imread(f'{im}')
|
9 |
try:
|
10 |
results = zxingcpp.read_barcodes(img)
|
@@ -39,5 +39,5 @@ with gr.Blocks() as app:
|
|
39 |
text_out = gr.Textbox(label="Decoded Text")
|
40 |
choose_color = gr.ColorPicker()
|
41 |
|
42 |
-
dec_btn.click(decode,in_im,text_out)
|
43 |
app.queue(concurrency_count=10).launch()
|
|
|
4 |
|
5 |
import cv2
|
6 |
|
7 |
+
def decode(im,col):
|
8 |
img = cv2.imread(f'{im}')
|
9 |
try:
|
10 |
results = zxingcpp.read_barcodes(img)
|
|
|
39 |
text_out = gr.Textbox(label="Decoded Text")
|
40 |
choose_color = gr.ColorPicker()
|
41 |
|
42 |
+
dec_btn.click(decode,[in_im,choose_color],text_out)
|
43 |
app.queue(concurrency_count=10).launch()
|