nickgambirasi
commited on
Commit
·
b5effdf
1
Parent(s):
67c4dcb
update output and title
Browse files
app.py
CHANGED
@@ -38,15 +38,25 @@ def full_inference(image, languages):
|
|
38 |
|
39 |
if text_infer:
|
40 |
|
41 |
-
output.update({'
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
if any(symbol_infer > model.conf):
|
44 |
|
45 |
output.update({'symbols': 'all_pass'})
|
46 |
|
|
|
|
|
|
|
|
|
47 |
return output
|
48 |
|
49 |
-
title = "Hyperintelligent
|
50 |
description = "Gradio deployment of models for text and symbol detection on product labels, powered by Tesseract and YOLOv5"
|
51 |
gr.Interface(
|
52 |
full_inference,
|
|
|
38 |
|
39 |
if text_infer:
|
40 |
|
41 |
+
output.update({'language_id': 'all_pass'})
|
42 |
+
output.update({'text': text_infer})
|
43 |
+
|
44 |
+
|
45 |
+
else:
|
46 |
+
|
47 |
+
output.update({'language_id': 'fail'})
|
48 |
|
49 |
if any(symbol_infer > model.conf):
|
50 |
|
51 |
output.update({'symbols': 'all_pass'})
|
52 |
|
53 |
+
else:
|
54 |
+
|
55 |
+
output.update({'symbols': 'fail'})
|
56 |
+
|
57 |
return output
|
58 |
|
59 |
+
title = "Hyperintelligent Art Parser"
|
60 |
description = "Gradio deployment of models for text and symbol detection on product labels, powered by Tesseract and YOLOv5"
|
61 |
gr.Interface(
|
62 |
full_inference,
|