danhtran2mind commited on
Commit
d3d2ab6
·
verified ·
1 Parent(s): 3d2ea0e

Update apps/gradio_app.py

Browse files
Files changed (1) hide show
  1. apps/gradio_app.py +2 -3
apps/gradio_app.py CHANGED
@@ -14,8 +14,7 @@ custom_css = open(os.path.join(os.path.dirname(__file__), "gradio_app", "static"
14
  model_dir = os.path.join(os.path.dirname(__file__), "..", "ckpts", "yolo", "finetune", "runs", "license_plate_detector", "weights")
15
  model_files = [f for f in os.listdir(model_dir) if os.path.isfile(os.path.join(model_dir, f))]
16
  default_model = next((element for element in model_files if "best" in element and element.endswith('.onnx')), None)
17
- print("model_files ", model_files)
18
- prpint("default_model ", default_model)
19
  # Define example files
20
  examples = [
21
  {
@@ -109,7 +108,7 @@ with gr.Blocks(css=custom_css) as iface:
109
  # Bind the processing function
110
  submit_button.click(
111
  fn=gradio_process,
112
- inputs=[model_path, input_file, input_type],
113
  outputs=[output_image, output_video, output_text, input_preview_image, input_preview_video]
114
  )
115
 
 
14
  model_dir = os.path.join(os.path.dirname(__file__), "..", "ckpts", "yolo", "finetune", "runs", "license_plate_detector", "weights")
15
  model_files = [f for f in os.listdir(model_dir) if os.path.isfile(os.path.join(model_dir, f))]
16
  default_model = next((element for element in model_files if "best" in element and element.endswith('.onnx')), None)
17
+
 
18
  # Define example files
19
  examples = [
20
  {
 
108
  # Bind the processing function
109
  submit_button.click(
110
  fn=gradio_process,
111
+ inputs=[os.path.join(model_dir, model_path), input_file, input_type],
112
  outputs=[output_image, output_video, output_text, input_preview_image, input_preview_video]
113
  )
114