mohammed3536 commited on
Commit
703c4df
1 Parent(s): 885f189

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -59,6 +59,8 @@ def generate_question_with_chatgpt(context):
59
  response = requests.post(CHATGPT_API_ENDPOINT, json=data, headers=headers)
60
  result = response.json()
61
 
 
 
62
  if 'choices' in result:
63
  # Extract the generated question, options, and correct answer from the response
64
  generated_question = {
@@ -95,7 +97,8 @@ def main():
95
  st.error("Please upload a PDF document.")
96
 
97
  if __name__ == "__main__":
98
- main()
 
99
 
100
 
101
 
 
59
  response = requests.post(CHATGPT_API_ENDPOINT, json=data, headers=headers)
60
  result = response.json()
61
 
62
+ print("API Response:", result) # Add this line for debugging
63
+
64
  if 'choices' in result:
65
  # Extract the generated question, options, and correct answer from the response
66
  generated_question = {
 
97
  st.error("Please upload a PDF document.")
98
 
99
  if __name__ == "__main__":
100
+
101
+
102
 
103
 
104