Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: socrea answer 추가 #16

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crud/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class ScoreAnalysis(BaseModel):

class ScoreResponse(BaseModel):
score: int
ocr_answer: str
analysis: List[ScoreAnalysis]# from pydantic import List

def score_crud(score):
Expand Down Expand Up @@ -44,7 +45,8 @@ def score_crud(score):
for i in range(wk[0], wk[-1]+1):
sa=[]
if i not in wrong_list:
sr = ScoreResponse(score=ascore[i], analysis=[])
print("!!!!!!", ascore[i], atext[i])
sr = ScoreResponse(score=ascore[i], ocr_answer=atext[i], analysis=[])
response[i] = sr
continue

Expand All @@ -59,7 +61,7 @@ def score_crud(score):
sa.append(ScoreAnalysis(question=saq, answer=saa, pronounce=sap))
print(sa)

sr = ScoreResponse(score=ascore[i], analysis=sa)
sr = ScoreResponse(score=ascore[i], ocr_answer=atext[i], analysis=sa)
# print(sr)

response[i] = sr
Expand Down
Loading