Spaces:
Sleeping
Sleeping
fahmiaziz98
commited on
Commit
·
7312439
1
Parent(s):
b620d4a
frist commit
Browse files- router/disaster.py +2 -1
- router/image_clf.py +2 -1
- router/sentiment.py +2 -1
- scripts/s3.py +3 -3
router/disaster.py
CHANGED
@@ -7,7 +7,8 @@ from utils.pipeline import load_model
|
|
7 |
|
8 |
router = APIRouter()
|
9 |
|
10 |
-
|
|
|
11 |
|
12 |
@router.post(
|
13 |
"/disaster_classification",
|
|
|
7 |
|
8 |
router = APIRouter()
|
9 |
|
10 |
+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
11 |
+
MODEL_PATH = os.path.join(BASE_DIR, "ml-models", "tinybert-disaster-tweet/")
|
12 |
|
13 |
@router.post(
|
14 |
"/disaster_classification",
|
router/image_clf.py
CHANGED
@@ -7,7 +7,8 @@ from utils.pipeline import load_model
|
|
7 |
|
8 |
router = APIRouter()
|
9 |
|
10 |
-
|
|
|
11 |
|
12 |
@router.post(
|
13 |
"/image_classification",
|
|
|
7 |
|
8 |
router = APIRouter()
|
9 |
|
10 |
+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
11 |
+
MODEL_PATH = os.path.join(BASE_DIR, "ml-models", "vit-human-pose-classification/")
|
12 |
|
13 |
@router.post(
|
14 |
"/image_classification",
|
router/sentiment.py
CHANGED
@@ -7,7 +7,8 @@ from utils.pipeline import load_model
|
|
7 |
|
8 |
router = APIRouter()
|
9 |
|
10 |
-
|
|
|
11 |
|
12 |
@router.post(
|
13 |
"/sentiment_classification",
|
|
|
7 |
|
8 |
router = APIRouter()
|
9 |
|
10 |
+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
11 |
+
MODEL_PATH = os.path.join(BASE_DIR, "ml-models", "tinybert-sentiment-analysis/")
|
12 |
|
13 |
@router.post(
|
14 |
"/sentiment_classification",
|
scripts/s3.py
CHANGED
@@ -3,9 +3,9 @@ import boto3
|
|
3 |
from pathlib import Path
|
4 |
from utils.log import logger
|
5 |
|
6 |
-
aws_access_key = os.getenv("AWS_ACCESS_KEY_ID")
|
7 |
-
aws_key_pw = os.getenv("AWS_SECRET_ACCESS_KEY")
|
8 |
-
BUCKET_NAME = os.getenv("BUCKET_NAME")
|
9 |
s3 = boto3.client(
|
10 |
"s3",
|
11 |
aws_access_key_id=aws_access_key,
|
|
|
3 |
from pathlib import Path
|
4 |
from utils.log import logger
|
5 |
|
6 |
+
aws_access_key = os.getenv("AWS_ACCESS_KEY_ID")
|
7 |
+
aws_key_pw = os.getenv("AWS_SECRET_ACCESS_KEY")
|
8 |
+
BUCKET_NAME = os.getenv("BUCKET_NAME")
|
9 |
s3 = boto3.client(
|
10 |
"s3",
|
11 |
aws_access_key_id=aws_access_key,
|