Keemoz0 commited on
Commit
f869733
·
1 Parent(s): 755cf64

remove gr.load

Browse files
.gradio/flagged/dataset1.csv ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ name,output,timestamp
2
+ ,,2024-12-20 23:48:03.557001
.gradio/flagged/dataset2.csv ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ Type name here:,output,timestamp
2
+ raaa,Helloraaa,2024-12-20 23:56:47.403516
app.py CHANGED
@@ -3,12 +3,10 @@ from huggingface_hub import hf_hub_download
3
  from PIL import Image
4
  import torch
5
  from transformers import AutoImageProcessor, AutoModelForObjectDetection
6
-
7
- gr.load("models/microsoft/table-transformer-structure-recognition").launch()
8
  # Load the processor and model for table structure recognition
9
  processor = AutoImageProcessor.from_pretrained("microsoft/table-transformer-structure-recognition")
10
  model = AutoModelForObjectDetection.from_pretrained("microsoft/table-transformer-structure-recognition")
11
-
12
  # Define the inference function
13
  def predict(image):
14
  # Preprocess the input image
 
3
  from PIL import Image
4
  import torch
5
  from transformers import AutoImageProcessor, AutoModelForObjectDetection
6
+ #gr.load("models/microsoft/table-transformer-structure-recognition").launch()
 
7
  # Load the processor and model for table structure recognition
8
  processor = AutoImageProcessor.from_pretrained("microsoft/table-transformer-structure-recognition")
9
  model = AutoModelForObjectDetection.from_pretrained("microsoft/table-transformer-structure-recognition")
 
10
  # Define the inference function
11
  def predict(image):
12
  # Preprocess the input image