Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def processing(pdf):
|
|
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.
|
48 |
engine="gpt-3.5-turbo", # You can use another engine if needed
|
49 |
prompt=prompt,
|
50 |
max_tokens=200,
|
|
|
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,
|