nehulagrawal commited on
Commit
07c316e
β€’
1 Parent(s): 6302ec1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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://raw.githubusercontent.com/kadirnar/dethub/main/data/images/highway.jpg', 'highway.jpg')
9
- torch.hub.download_url_to_file('https://user-images.githubusercontent.com/34196005/142742872-1fefcc4d-d7e6-4c43-bbb7-6b5982f7e4ba.jpg', 'highway1.jpg')
10
- torch.hub.download_url_to_file('https://raw.githubusercontent.com/obss/sahi/main/tests/data/small-vehicles1.jpeg', 'small-vehicles1.jpeg')
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 = [['highway.jpg', 'foduucom/table-detection-and-extraction', 640, 0.25, 0.45], ['highway1.jpg', 'foduucom/table-detection-and-extraction', 640, 0.25, 0.45], ['small-vehicles1.jpeg', 'foduucom/table-detection-and-extraction', 1280, 0.25, 0.45]]
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,