Update app.py
Browse files
app.py
CHANGED
@@ -135,9 +135,10 @@
|
|
135 |
|
136 |
import openai
|
137 |
import streamlit as st
|
|
|
138 |
|
139 |
# Set your OpenAI API key
|
140 |
-
openai.api_key = "
|
141 |
|
142 |
def generate_question(role, topic, difficulty_level):
|
143 |
prompt = f"Generate an interview question for the role of {role} on the topic of {topic} with difficulty level {difficulty_level}."
|
|
|
135 |
|
136 |
import openai
|
137 |
import streamlit as st
|
138 |
+
from langchain_community.llms import OpenAI
|
139 |
|
140 |
# Set your OpenAI API key
|
141 |
+
openai.api_key = st.secrets["OPENAI_API_KEY"])
|
142 |
|
143 |
def generate_question(role, topic, difficulty_level):
|
144 |
prompt = f"Generate an interview question for the role of {role} on the topic of {topic} with difficulty level {difficulty_level}."
|