from git import Repo import os import openai import streamlit as st GITHUB_REPO_URL = os.environ.get("GITHUB_REPO_URL") if not os.path.exists('repo_directory'): print('under if condition',os.path.exists('repo_directory')) Repo.clone_from(GITHUB_REPO_URL, 'repo_directory') if "openai_key" not in st.session_state: with st.form("API key"): key = st.text_input("OpenAI Key", value="", type="password") if st.form_submit_button("Submit"): st.session_state.openai_key = key openai.api_key = key st.session_state.prompt_history = [] st.success('Saved API key for this session.') if "openai_key" in st.session_state: from repo_directory.PersonalityChatbot.app import * main()