naveenvenkatesh commited on
Commit
4683caa
1 Parent(s): 057bdfa

Update headings_extractor.py

Browse files
Files changed (1) hide show
  1. headings_extractor.py +5 -3
headings_extractor.py CHANGED
@@ -1,6 +1,5 @@
1
- from openai import OpenAI
2
  from PyPDF2 import PdfReader
3
- # import fitz
4
  import os
5
  import gradio as gr
6
 
@@ -16,7 +15,10 @@ class HeadingsExtractor:
16
  Returns:
17
  str: Extracted headings.
18
  """
19
- self.client=OpenAI()
 
 
 
20
 
21
  def file_output_fnn(self,file_path):
22
  file_path = file_path.name
 
1
+ import openai
2
  from PyPDF2 import PdfReader
 
3
  import os
4
  import gradio as gr
5
 
 
15
  Returns:
16
  str: Extracted headings.
17
  """
18
+ openai.api_type = os.getenv['api_type']
19
+ openai.api_base = os.getenv['api_base']
20
+ openai.api_version = os.getenv['api_version']
21
+ openai.api_key = os.getenv['api_key']
22
 
23
  def file_output_fnn(self,file_path):
24
  file_path = file_path.name