Spaces:
Runtime error
Runtime error
Update app.py
Browse files51 unmodified lines525354555657585977 unmodified lines13713813914014114251 unmodified linesax = plt.gca()colors = COLORS * 100for score, (xmin, ymin, xmax, ymax), label, color in zip(scores, boxes, labels, colors):ax.add_patch(plt.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, fill=False, color=color, linewidth=3))ax.text(xmin, ymin, f"{label}: {score:0.2f}", fontsize=15, bbox=dict(facecolor="yellow", alpha=0.5))plt.axis("off")return fig2img(plt.gcf())77 unmodified lineswith gr.Column():url_input = gr.Textbox(lines=2,label='Enter valid image URL here..')original_image = gr.Image(shape=(750,750))with gr.Column():img_output_from_url = gr.Image(shape=(750,750))51 unmodified lines525354555657585977 unmodified lines13713813914014114214351 unmodified linesax = plt.gca()colors = COLORS * 100for score, (xmin, ymin, xmax, ymax), label, color in zip(scores, boxes, labels, colors):ax.add_patch(plt.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, fill=False, color=color, linewidth=5))ax.text(xmin, ymin, f"{label}: {score:0.2f}", fontsize=25, bbox=dict(facecolor="yellow", alpha=0.5))plt.axis("off")return fig2img(plt.gcf())77 unmodified lineswith gr.Column():url_input = gr.Textbox(lines=2,label='Enter valid image URL here..')original_image = gr.Image(shape=(750,750))url_input.submit(get_original_image,url_input,original_image)with gr.Column():img_output_from_url = gr.Image(shape=(750,750))
app.py+3-2