Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,10 +43,9 @@ def processing(pdf):
|
|
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 =
|
49 |
-
engine="
|
50 |
prompt=prompt,
|
51 |
max_tokens=200,
|
52 |
temperature=0.7
|
|
|
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.Completion.create(
|
48 |
+
engine="text-davinci-003", # You can use another engine if needed
|
49 |
prompt=prompt,
|
50 |
max_tokens=200,
|
51 |
temperature=0.7
|