Spaces:
Running
Running
Commit
·
7c0b2d1
1
Parent(s):
c4e6c5e
fix: feature not returning
Browse files
cloudbuild.yaml
CHANGED
@@ -1,19 +1,8 @@
|
|
1 |
steps:
|
2 |
- name: "gcr.io/cloud-builders/docker"
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
"-t",
|
7 |
-
"us-central1-docker.pkg.dev/${PROJECT_ID}/interview-ai-detector/model-prediction:latest",
|
8 |
-
"./core-model-prediction",
|
9 |
-
]
|
10 |
-
|
11 |
-
- name: "gcr.io/cloud-builders/docker"
|
12 |
-
args:
|
13 |
-
[
|
14 |
-
"push",
|
15 |
-
"us-central1-docker.pkg.dev/${PROJECT_ID}/interview-ai-detector/model-prediction:latest",
|
16 |
-
]
|
17 |
|
18 |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
|
19 |
entrypoint: "bash"
|
|
|
1 |
steps:
|
2 |
- name: "gcr.io/cloud-builders/docker"
|
3 |
+
dir: "core-model-prediction"
|
4 |
+
script: |
|
5 |
+
docker build -t us-central1-docker.pkg.dev/${PROJECT_ID}/interview-ai-detector/model-prediction:latest .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
|
8 |
entrypoint: "bash"
|
core-model-prediction/random_forest_dependencies.py
CHANGED
@@ -5,7 +5,6 @@ from collections import Counter
|
|
5 |
class RandomForestDependencies:
|
6 |
def __init__(self):
|
7 |
self.gemma2bdependencies = Gemma2BDependencies()
|
8 |
-
self.random_forest_features = []
|
9 |
|
10 |
def calculate_features(self, question: str, answer: str, probability: float, backspace_count: int, typing_duration: int, letter_click_counts: dict[str, int]):
|
11 |
cosine_similarity = self.gemma2bdependencies.calculate_cosine_similarity(
|
@@ -15,7 +14,7 @@ class RandomForestDependencies:
|
|
15 |
letter_discrepancy = self.calculate_letter_discrepancy(
|
16 |
answer, letter_click_counts)
|
17 |
|
18 |
-
|
19 |
cosine_similarity, probability, backspace_count_normalized,
|
20 |
typing_duration_normalized, letter_discrepancy
|
21 |
]
|
|
|
5 |
class RandomForestDependencies:
|
6 |
def __init__(self):
|
7 |
self.gemma2bdependencies = Gemma2BDependencies()
|
|
|
8 |
|
9 |
def calculate_features(self, question: str, answer: str, probability: float, backspace_count: int, typing_duration: int, letter_click_counts: dict[str, int]):
|
10 |
cosine_similarity = self.gemma2bdependencies.calculate_cosine_similarity(
|
|
|
14 |
letter_discrepancy = self.calculate_letter_discrepancy(
|
15 |
answer, letter_click_counts)
|
16 |
|
17 |
+
return [
|
18 |
cosine_similarity, probability, backspace_count_normalized,
|
19 |
typing_duration_normalized, letter_discrepancy
|
20 |
]
|