matsuap commited on
Commit
d30be11
·
verified ·
1 Parent(s): 7a7b891

Upload workbook_server.py

Browse files
Files changed (1) hide show
  1. workbook_server.py +2 -0
workbook_server.py CHANGED
@@ -61,9 +61,11 @@ def get_questions_by_chapter(request: ChapterRequest):
61
  raise HTTPException(status_code=404, detail="Questions not found for the given chapter number")
62
  question_list = []
63
  for row in questions:
 
64
  image_path = os.path.join('./image', row[4])
65
  with open(image_path, "rb") as image_file:
66
  encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
 
67
  question_list.append({
68
  "question_text": row[0],
69
  "options": row[1],
 
61
  raise HTTPException(status_code=404, detail="Questions not found for the given chapter number")
62
  question_list = []
63
  for row in questions:
64
+ '''
65
  image_path = os.path.join('./image', row[4])
66
  with open(image_path, "rb") as image_file:
67
  encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
68
+ '''
69
  question_list.append({
70
  "question_text": row[0],
71
  "options": row[1],