georgeek commited on
Commit
90a72cb
Β·
1 Parent(s): cbbdb66
Files changed (1) hide show
  1. 2Tutor.py +2 -1
2Tutor.py CHANGED
@@ -79,13 +79,14 @@ else:
79
  module = importlib.import_module(module_name)
80
  module.run()
81
 
 
82
  # OpenAI API Section
83
  st.sidebar.title("Ask AI")
84
  api_key = os.getenv("OPENAI_API_KEY")
85
  if not api_key:
86
  api_key = st.sidebar.text_input("Enter your OpenAI API Key", type="password")
87
 
88
- client = OpenAI()
89
 
90
  # Create side menus for toggles from the pages/ list
91
  st.sidebar.title("Focus Areas")
 
79
  module = importlib.import_module(module_name)
80
  module.run()
81
 
82
+
83
  # OpenAI API Section
84
  st.sidebar.title("Ask AI")
85
  api_key = os.getenv("OPENAI_API_KEY")
86
  if not api_key:
87
  api_key = st.sidebar.text_input("Enter your OpenAI API Key", type="password")
88
 
89
+ client = OpenAI(api_key=api_key)
90
 
91
  # Create side menus for toggles from the pages/ list
92
  st.sidebar.title("Focus Areas")