mohammed3536 commited on
Commit
d283a13
1 Parent(s): 30c8c88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -43,8 +43,9 @@ def processing(pdf):
43
 
44
  # Function to generate questions using OpenAI GPT-3
45
  def generate_questions(text, num_questions):
 
46
  prompt = f"Generate {num_questions} questions from the given text:\n{text}"
47
- response = OpenAI.completions.create(
48
  engine="gpt-3.5-turbo", # You can use another engine if needed
49
  prompt=prompt,
50
  max_tokens=200,
 
43
 
44
  # Function to generate questions using OpenAI GPT-3
45
  def generate_questions(text, num_questions):
46
+ client = OpenAI()
47
  prompt = f"Generate {num_questions} questions from the given text:\n{text}"
48
+ response = client.chat.completions.create(
49
  engine="gpt-3.5-turbo", # You can use another engine if needed
50
  prompt=prompt,
51
  max_tokens=200,