Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,12 +40,13 @@ def conversational_chat(query):
|
|
40 |
def save_uploaded_file_as_mp3(uploaded_file, output_file_path):
|
41 |
audio = AudioSegment.from_file(uploaded_file)
|
42 |
audio.export(output_file_path, format="mp3")
|
|
|
|
|
|
|
|
|
43 |
|
44 |
def ui():
|
45 |
-
|
46 |
-
label="#### Your OpenAI API key π",
|
47 |
-
placeholder="Paste your openAI API key, sk-",
|
48 |
-
type="password")
|
49 |
|
50 |
if user_api_key is not None and user_api_key.strip() != "":
|
51 |
os.environ["OPENAI_API_KEY"] =user_api_key
|
|
|
40 |
def save_uploaded_file_as_mp3(uploaded_file, output_file_path):
|
41 |
audio = AudioSegment.from_file(uploaded_file)
|
42 |
audio.export(output_file_path, format="mp3")
|
43 |
+
user_api_key = st.sidebar.text_input(
|
44 |
+
label="#### Your OpenAI API key π",
|
45 |
+
placeholder="Paste your openAI API key, sk-",
|
46 |
+
type="password")
|
47 |
|
48 |
def ui():
|
49 |
+
|
|
|
|
|
|
|
50 |
|
51 |
if user_api_key is not None and user_api_key.strip() != "":
|
52 |
os.environ["OPENAI_API_KEY"] =user_api_key
|