mohammed3536 commited on
Commit
0f92905
1 Parent(s): 63d19b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -11,7 +11,7 @@ nltk.download('averaged_perceptron_tagger')
11
 
12
  # ChatGPT API endpoint
13
  CHATGPT_API_ENDPOINT = "https://api.openai.com/v1/chat/completions"
14
- OPENAI_API_KEY = "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" # Replace with your ChatGPT API key
15
 
16
  def extract_text_from_pdf(pdf_file):
17
  pdf_reader = PyPDF2.PdfReader(pdf_file)
@@ -61,8 +61,7 @@ def generate_question_with_chatgpt(context):
61
 
62
  # Decode the byte string to Unicode string
63
  generated_question = generated_question.decode("utf-8")
64
-
65
- return generated_question
66
 
67
  def main():
68
  # Title of the Application
 
11
 
12
  # ChatGPT API endpoint
13
  CHATGPT_API_ENDPOINT = "https://api.openai.com/v1/chat/completions"
14
+ OPENAI_API_KEY = "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"
15
 
16
  def extract_text_from_pdf(pdf_file):
17
  pdf_reader = PyPDF2.PdfReader(pdf_file)
 
61
 
62
  # Decode the byte string to Unicode string
63
  generated_question = generated_question.decode("utf-8")
64
+ return generated_question
 
65
 
66
  def main():
67
  # Title of the Application