cdcvd commited on
Commit
1915a9e
1 Parent(s): 65ee7c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -180,12 +180,12 @@ def process_numbers(model, image_path):
180
  return ''.join([obj['label'] for obj in sorted_objects])
181
 
182
  def gradio_interface(input_file):
183
- process_file(input_file)
184
  json_output = run_detection_and_ocr()
185
  with open(json_output, 'r', encoding='utf-8') as f:
186
  data = json.load(f)
187
  logging.info("Generated JSON output for Gradio interface.")
188
- return data
189
 
190
  iface = gr.Interface(
191
  fn=gradio_interface,
 
180
  return ''.join([obj['label'] for obj in sorted_objects])
181
 
182
  def gradio_interface(input_file):
183
+ images = process_file(input_file)
184
  json_output = run_detection_and_ocr()
185
  with open(json_output, 'r', encoding='utf-8') as f:
186
  data = json.load(f)
187
  logging.info("Generated JSON output for Gradio interface.")
188
+ return images,data
189
 
190
  iface = gr.Interface(
191
  fn=gradio_interface,