Spaces:
Sleeping
Sleeping
danial0203
commited on
Commit
•
3790fd1
1
Parent(s):
5b5d184
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,13 @@ s3 = s3fs.S3FileSystem(
|
|
19 |
secret=os.getenv('AWS_SECRET_KEY'),
|
20 |
client_kwargs={'region_name': os.getenv('AWS_REGION')}
|
21 |
)
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
def upload_file_to_s3(file_path, bucket, object_name=None):
|
25 |
if object_name is None:
|
|
|
19 |
secret=os.getenv('AWS_SECRET_KEY'),
|
20 |
client_kwargs={'region_name': os.getenv('AWS_REGION')}
|
21 |
)
|
22 |
+
|
23 |
+
textract_client = boto3.client(
|
24 |
+
'textract',
|
25 |
+
aws_access_key_id=('AWS_ACCESS_KEY')',
|
26 |
+
aws_secret_access_key=('AWS_SECRET_KEY'),
|
27 |
+
region_name=('AWS_REGION')'
|
28 |
+
)
|
29 |
|
30 |
def upload_file_to_s3(file_path, bucket, object_name=None):
|
31 |
if object_name is None:
|