cxeep commited on
Commit
00e36b4
·
verified ·
1 Parent(s): 0d7133a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import os
5
  os.environ["LD_LIBRARY_PATH"] = os.getenv("LD_LIBRARY_PATH", "") + ":./third_party/"
6
  os.system("chmod a+x ./yolov5s-tt100k")
7
  def run_yolov5s(image_filepath):
8
- result = subprocess.run(["./yolov5s-tt100k", "-m", "./yolov5s_tt100k_opt_fp32.tmfile", "-i", image_filepath], capture_output=True, text=True)
9
  return "yolov5s-tt100k.out.jpg", result.stdout
10
 
11
  iface = gr.Interface(fn=run_yolov5s, inputs=gr.Image(type="filepath"), outputs=[gr.Image(type="filepath"), gr.Textbox()])
 
5
  os.environ["LD_LIBRARY_PATH"] = os.getenv("LD_LIBRARY_PATH", "") + ":./third_party/"
6
  os.system("chmod a+x ./yolov5s-tt100k")
7
  def run_yolov5s(image_filepath):
8
+ result = subprocess.run(["./yolov5s-tt100k", "-m", "./yolov5s_tt100k_opt_fp32.tmfile", "-i", image_filepath], capture_output=True, text=True, shell=True, env=os.environ)
9
  return "yolov5s-tt100k.out.jpg", result.stdout
10
 
11
  iface = gr.Interface(fn=run_yolov5s, inputs=gr.Image(type="filepath"), outputs=[gr.Image(type="filepath"), gr.Textbox()])