nehulagrawal
commited on
Commit
β’
07c316e
1
Parent(s):
6302ec1
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,9 @@ from sahi.utils.cv import visualize_object_predictions, read_image
|
|
5 |
from ultralyticsplus import YOLO
|
6 |
|
7 |
# Images
|
8 |
-
torch.hub.download_url_to_file('https://
|
9 |
-
torch.hub.download_url_to_file('https://
|
10 |
-
torch.hub.download_url_to_file('https://
|
11 |
|
12 |
def yolov8_inference(
|
13 |
image: gr.inputs.Image = None,
|
@@ -72,7 +72,7 @@ outputs = gr.outputs.Image(type="filepath", label="Output Image")
|
|
72 |
title = "YoloTableExtract: Efficient Table Detection"
|
73 |
|
74 |
description = "π YoloTableExtract is a powerful space that utilizes YOLOv8 for accurate table detection and extraction. Whether tables are bordered or borderless, this space can effectively identify and extract them from images. For further assistance and support related to documentation or data-related issues, feel free to contact info@foduu.com. If you find this space helpful, please show your appreciation by liking it. β€οΈππΌ"
|
75 |
-
examples = [['
|
76 |
demo_app = gr.Interface(
|
77 |
fn=yolov8_inference,
|
78 |
inputs=inputs,
|
|
|
5 |
from ultralyticsplus import YOLO
|
6 |
|
7 |
# Images
|
8 |
+
torch.hub.download_url_to_file('https://huggingface.co/spaces/foduucom/table-extraction-yolov8/resolve/main/test/table1.jpg', 'document1.jpg')
|
9 |
+
torch.hub.download_url_to_file('https://huggingface.co/spaces/foduucom/table-extraction-yolov8/resolve/main/test/table2.jpg', 'document2.jpg')
|
10 |
+
torch.hub.download_url_to_file('https://huggingface.co/spaces/foduucom/table-extraction-yolov8/resolve/main/test/table3.jpg', 'document3.jpg')
|
11 |
|
12 |
def yolov8_inference(
|
13 |
image: gr.inputs.Image = None,
|
|
|
72 |
title = "YoloTableExtract: Efficient Table Detection"
|
73 |
|
74 |
description = "π YoloTableExtract is a powerful space that utilizes YOLOv8 for accurate table detection and extraction. Whether tables are bordered or borderless, this space can effectively identify and extract them from images. For further assistance and support related to documentation or data-related issues, feel free to contact info@foduu.com. If you find this space helpful, please show your appreciation by liking it. β€οΈππΌ"
|
75 |
+
examples = [['document1.jpg', 'foduucom/table-detection-and-extraction', 640, 0.25, 0.45], ['document2.jpg', 'foduucom/table-detection-and-extraction', 640, 0.25, 0.45], ['document3.jpg', 'foduucom/table-detection-and-extraction', 1280, 0.25, 0.45]]
|
76 |
demo_app = gr.Interface(
|
77 |
fn=yolov8_inference,
|
78 |
inputs=inputs,
|