codic commited on
Commit
1d25483
·
verified ·
1 Parent(s): 11d8d89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
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
- 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
- )
 
 
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()