mohammed3536 commited on
Commit
bb5cf51
·
verified ·
1 Parent(s): dbbe96f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -56,14 +56,11 @@ def generate_question_with_chatgpt(context):
56
  result = response.json()
57
 
58
  if 'choices' in result:
59
-
60
-
61
 
62
- # Extract the generated question from the response
63
- generated_question = result["choices"][0]["message"]["content"]
64
-
65
- # Decode the byte string to Unicode string
66
- generated_question = generated_question.decode("utf-8")
67
 
68
  return generated_question
69
 
 
56
  result = response.json()
57
 
58
  if 'choices' in result:
59
+ # Extract the generated question from the response
60
+ generated_question = result["choices"][0]["message"]["content"]
61
 
62
+ # Decode the byte string to Unicode string
63
+ generated_question = generated_question.decode("utf-8")
 
 
 
64
 
65
  return generated_question
66