Upload folder using huggingface_hub
Browse files- __pycache__/aws_helper.cpython-38.pyc +0 -0
- aws_helper.py +6 -5
- config.json +1 -1
- pytorch_model.bin +1 -1
__pycache__/aws_helper.cpython-38.pyc
CHANGED
Binary files a/__pycache__/aws_helper.cpython-38.pyc and b/__pycache__/aws_helper.cpython-38.pyc differ
|
|
aws_helper.py
CHANGED
@@ -3,14 +3,15 @@ import os
|
|
3 |
import boto3
|
4 |
import sagemaker
|
5 |
|
6 |
-
|
7 |
-
|
|
|
8 |
os.environ["AWS_DEFAULT_REGION"] = REGION_NAME
|
9 |
|
10 |
auth_arguments = {
|
11 |
-
"aws_access_key_id": os.
|
12 |
-
"aws_secret_access_key": os.
|
13 |
-
"aws_session_token": os.
|
14 |
"region_name": REGION_NAME,
|
15 |
}
|
16 |
|
|
|
3 |
import boto3
|
4 |
import sagemaker
|
5 |
|
6 |
+
# Assign default value if env variable not fond
|
7 |
+
REGION_NAME = os.getenv("AWS_REGION", "us-east-1")
|
8 |
+
ROLE_NAME = os.getenv("AWS_ROLE_NAME", "hamza_connector")
|
9 |
os.environ["AWS_DEFAULT_REGION"] = REGION_NAME
|
10 |
|
11 |
auth_arguments = {
|
12 |
+
"aws_access_key_id": os.getenv("AWS_ACCESS_KEY_ID", None),
|
13 |
+
"aws_secret_access_key": os.getenv("AWS_SECRET_ACCESS_KEY", None),
|
14 |
+
"aws_session_token": os.getenv("AWS_SESSION_TOKEN", None),
|
15 |
"region_name": REGION_NAME,
|
16 |
}
|
17 |
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/tmp/
|
3 |
"activation": "gelu",
|
4 |
"architectures": [
|
5 |
"DistilBertForSequenceClassification"
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "/tmp/tmpsu5lyymk",
|
3 |
"activation": "gelu",
|
4 |
"architectures": [
|
5 |
"DistilBertForSequenceClassification"
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 263166698
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fed50630092b86768606400d999a9cf9e14444abdfe76507fca2e8db3bd16df6
|
3 |
size 263166698
|