mohammed3536 mohammednouman commited on
Commit
c77e2ac
·
verified ·
1 Parent(s): 67908fb

Update app.py (#1)

Browse files

- Update app.py (64a96e17c50c81af53c9d29f359f83884367db06)


Co-authored-by: Mohammed Nouman Ghori <[email protected]>

Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -54,10 +54,8 @@ def generate_question_with_chatgpt():
54
  response = requests.post(CHATGPT_API_ENDPOINT, json=data, headers=headers)
55
  result = response.json()
56
 
57
- return generated_question
58
-
59
  # Extract the generated question from the response
60
- generated_question = result["generated_question"]
61
  return generated_question
62
 
63
  def main():
 
54
  response = requests.post(CHATGPT_API_ENDPOINT, json=data, headers=headers)
55
  result = response.json()
56
 
 
 
57
  # Extract the generated question from the response
58
+ generated_question = result["choices"][0]["message"]["content"]
59
  return generated_question
60
 
61
  def main():