Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -230,15 +230,17 @@ description = 'Accurate entity extraction with combined AI and regex validation'
|
|
| 230 |
|
| 231 |
if __name__ == '__main__':
|
| 232 |
demo = gr.Interface(
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
|
|
|
| 244 |
demo.launch()
|
|
|
|
| 230 |
|
| 231 |
if __name__ == '__main__':
|
| 232 |
demo = gr.Interface(
|
| 233 |
+
inference,
|
| 234 |
+
[gr.Image(type='pil', label='Upload Business Card'),
|
| 235 |
+
gr.Slider(0.1, 1, 0.4, step=0.1, label='Confidence Threshold')],
|
| 236 |
+
[gr.Textbox(label="OCR Result"),
|
| 237 |
+
gr.JSON(label="Structured Data"),
|
| 238 |
+
gr.File(label="Download CSV"),
|
| 239 |
+
gr.Textbox(label="Error Log")],
|
| 240 |
+
title=title,
|
| 241 |
+
description=description,
|
| 242 |
+
css=".gr-interface {max-width: 800px !important;}",
|
| 243 |
+
allow_api=True # This line enables the API endpoint
|
| 244 |
+
)
|
| 245 |
+
|
| 246 |
demo.launch()
|