Update app.py
Browse files
app.py
CHANGED
@@ -648,6 +648,8 @@ def main():
|
|
648 |
st.write('DromeLlama is asleep. Starting up now on A10 - please give 5 minutes then retry as KEDA scales up from zero to activate running container(s).')
|
649 |
|
650 |
openai.api_key = os.getenv('OPENAI_API_KEY')
|
|
|
|
|
651 |
menu = ["txt", "htm", "xlsx", "csv", "md", "py"]
|
652 |
choice = st.sidebar.selectbox("Output File Type:", menu)
|
653 |
|
@@ -695,7 +697,7 @@ def main():
|
|
695 |
st.write(response)
|
696 |
filename = generate_filename(user_prompt, choice)
|
697 |
create_file(filename, user_prompt, response, should_save)
|
698 |
-
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
699 |
|
700 |
# Compose a file sidebar of markdown md files:
|
701 |
all_files = glob.glob("*.md")
|
|
|
648 |
st.write('DromeLlama is asleep. Starting up now on A10 - please give 5 minutes then retry as KEDA scales up from zero to activate running container(s).')
|
649 |
|
650 |
openai.api_key = os.getenv('OPENAI_API_KEY')
|
651 |
+
if openai.api_key == None: openai.api_key = st.secrets['OPENAI_API_KEY']
|
652 |
+
|
653 |
menu = ["txt", "htm", "xlsx", "csv", "md", "py"]
|
654 |
choice = st.sidebar.selectbox("Output File Type:", menu)
|
655 |
|
|
|
697 |
st.write(response)
|
698 |
filename = generate_filename(user_prompt, choice)
|
699 |
create_file(filename, user_prompt, response, should_save)
|
700 |
+
#st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
701 |
|
702 |
# Compose a file sidebar of markdown md files:
|
703 |
all_files = glob.glob("*.md")
|