deactivate barcode scanning for now 2
Browse files
app.py
CHANGED
|
@@ -131,16 +131,16 @@ with (gr.Blocks(head=prefer_frontal_cam_html) as block):
|
|
| 131 |
current_eater_id = {'value': None}
|
| 132 |
|
| 133 |
|
| 134 |
-
@gr.on(inputs=im, outputs=eater_id)
|
| 135 |
-
def search_eater_id(image):
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
|
| 145 |
|
| 146 |
b = gr.Button('PRESS TO PREDICT')
|
|
|
|
| 131 |
current_eater_id = {'value': None}
|
| 132 |
|
| 133 |
|
| 134 |
+
# @gr.on(inputs=im, outputs=eater_id)
|
| 135 |
+
# def search_eater_id(image):
|
| 136 |
+
# d = []#decode(image)
|
| 137 |
+
# default_value = None
|
| 138 |
+
# current_value = current_eater_id['value'] or default_value
|
| 139 |
+
# new_value = d[0].data if d else default_value
|
| 140 |
+
# # If it is really a new value different from the default one, change it.
|
| 141 |
+
# final_value = new_value if new_value != default_value else current_value
|
| 142 |
+
# current_eater_id['value'] = final_value
|
| 143 |
+
# return final_value
|
| 144 |
|
| 145 |
|
| 146 |
b = gr.Button('PRESS TO PREDICT')
|