Spaces:
Sleeping
Sleeping
Commit
·
1d0ae2e
1
Parent(s):
7a92e6c
refactor: remove unused variable
Browse files
core-model-prediction/prediction.py
CHANGED
|
@@ -11,12 +11,9 @@ app = FastAPI()
|
|
| 11 |
|
| 12 |
|
| 13 |
class PredictRequest(BaseModel):
|
| 14 |
-
question: str
|
| 15 |
answer: str
|
| 16 |
backspace_count: int
|
| 17 |
-
typing_duration: int
|
| 18 |
letter_click_counts: dict[str, int]
|
| 19 |
-
gpt35_answer: str
|
| 20 |
gpt4o_answer: str
|
| 21 |
|
| 22 |
|
|
@@ -36,12 +33,9 @@ async def predict(request: RequestModel):
|
|
| 36 |
|
| 37 |
|
| 38 |
def process_instance(data: PredictRequest):
|
| 39 |
-
question = data.question
|
| 40 |
answer = data.answer
|
| 41 |
backspace_count = data.backspace_count
|
| 42 |
-
typing_duration = data.typing_duration
|
| 43 |
letter_click_counts = data.letter_click_counts
|
| 44 |
-
gpt35_answer = data.gpt35_answer
|
| 45 |
gpt4o_answer = data.gpt4o_answer
|
| 46 |
|
| 47 |
# Data preparation for 1st model
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
class PredictRequest(BaseModel):
|
|
|
|
| 14 |
answer: str
|
| 15 |
backspace_count: int
|
|
|
|
| 16 |
letter_click_counts: dict[str, int]
|
|
|
|
| 17 |
gpt4o_answer: str
|
| 18 |
|
| 19 |
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
def process_instance(data: PredictRequest):
|
|
|
|
| 36 |
answer = data.answer
|
| 37 |
backspace_count = data.backspace_count
|
|
|
|
| 38 |
letter_click_counts = data.letter_click_counts
|
|
|
|
| 39 |
gpt4o_answer = data.gpt4o_answer
|
| 40 |
|
| 41 |
# Data preparation for 1st model
|