keldrenloy commited on
Commit
de5405e
·
1 Parent(s): 41ffdbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,8 +1,8 @@
1
- import gradio as gr
2
  import os
3
  os.system('pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
4
  os.system('sudo apt-get install tesseract-ocr')
5
  os.system('pip install -q pytesseract')
 
6
  import torch
7
  from datasets import load_dataset, ClassLabel
8
  from transformers import LayoutLMv3ForTokenClassification, LayoutLMv3Processor,LayoutLMv3FeatureExtractor
@@ -135,6 +135,4 @@ demo = gr.Interface(fn = image_render,
135
  flagging_callback = gr.CSVLogger(),
136
  flagging_dir = "flagged"
137
  )
138
-
139
- if __name__ == "__main__":
140
- demo.launch()
 
 
1
  import os
2
  os.system('pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
3
  os.system('sudo apt-get install tesseract-ocr')
4
  os.system('pip install -q pytesseract')
5
+ import gradio as gr
6
  import torch
7
  from datasets import load_dataset, ClassLabel
8
  from transformers import LayoutLMv3ForTokenClassification, LayoutLMv3Processor,LayoutLMv3FeatureExtractor
 
135
  flagging_callback = gr.CSVLogger(),
136
  flagging_dir = "flagged"
137
  )
138
+ demo.launch(debug = True)