JaMe76 commited on
Commit
810f982
·
1 Parent(s): db0d804

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,6 @@
1
  import os
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
 
4
- credentials_kwargs={"aws_access_key_id": os.environ["ACCESS_KEY"],"aws_secret_access_key": os.environ["SECRET_KEY"]}
5
-
6
  # work around: https://discuss.huggingface.co/t/how-to-install-a-specific-version-of-gradio-in-spaces/13552
7
  os.system("pip uninstall -y gradio")
8
  os.system("pip install gradio==3.4.1")
@@ -97,6 +95,9 @@ d_item = dd.D2FrcnnDetector(item_config_path, item_weights_path, categories_item
97
  pdf_text = PdfTextDetector(_XSL_PATH)
98
 
99
  # text detector
 
 
 
100
  tex_text = dd.TextractOcrDetector(**credentials_kwargs)
101
 
102
 
 
1
  import os
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
 
 
 
4
  # work around: https://discuss.huggingface.co/t/how-to-install-a-specific-version-of-gradio-in-spaces/13552
5
  os.system("pip uninstall -y gradio")
6
  os.system("pip install gradio==3.4.1")
 
95
  pdf_text = PdfTextDetector(_XSL_PATH)
96
 
97
  # text detector
98
+ credentials_kwargs={"aws_access_key_id": os.environ["ACCESS_KEY"],
99
+ "aws_secret_access_key": os.environ["SECRET_KEY"],
100
+ "region": os.environ["REGION"]}
101
  tex_text = dd.TextractOcrDetector(**credentials_kwargs)
102
 
103