Spaces:
Build error
Build error
Update pages/Name_Reactions.py
Browse files- pages/Name_Reactions.py +5 -4
pages/Name_Reactions.py
CHANGED
|
@@ -5,6 +5,7 @@ import tempfile
|
|
| 5 |
import threading
|
| 6 |
from groq import Groq
|
| 7 |
import requests
|
|
|
|
| 8 |
import streamlit as st
|
| 9 |
import json
|
| 10 |
from rdkit import Chem
|
|
@@ -16,9 +17,9 @@ from embedchain import App
|
|
| 16 |
from embedchain.config import BaseLlmConfig
|
| 17 |
from embedchain.helpers.callbacks import (StreamingStdOutCallbackHandlerYield,
|
| 18 |
generate)
|
| 19 |
-
|
| 20 |
-
client_groq = Groq(api_key=
|
| 21 |
-
client_openai = OpenAI(api_key=
|
| 22 |
|
| 23 |
link_custom_functions = [
|
| 24 |
{
|
|
@@ -92,7 +93,7 @@ def get_ec_app(api_key):
|
|
| 92 |
|
| 93 |
with st.sidebar:
|
| 94 |
#openai_access_token = st.text_input("OpenAI API Key", key="api_key", type="password")
|
| 95 |
-
api_key =
|
| 96 |
|
| 97 |
|
| 98 |
#if st.session_state.api_key:
|
|
|
|
| 5 |
import threading
|
| 6 |
from groq import Groq
|
| 7 |
import requests
|
| 8 |
+
from dotenv import load_dotenv
|
| 9 |
import streamlit as st
|
| 10 |
import json
|
| 11 |
from rdkit import Chem
|
|
|
|
| 17 |
from embedchain.config import BaseLlmConfig
|
| 18 |
from embedchain.helpers.callbacks import (StreamingStdOutCallbackHandlerYield,
|
| 19 |
generate)
|
| 20 |
+
load_dotenv()
|
| 21 |
+
client_groq = Groq(api_key=os.getenv('GROQ_API_KEY'))
|
| 22 |
+
client_openai = OpenAI(api_key=os.getenv('OPENA_AI_API_KEY'))
|
| 23 |
|
| 24 |
link_custom_functions = [
|
| 25 |
{
|
|
|
|
| 93 |
|
| 94 |
with st.sidebar:
|
| 95 |
#openai_access_token = st.text_input("OpenAI API Key", key="api_key", type="password")
|
| 96 |
+
api_key = os.getenv('OPENA_AI_API_KEY')
|
| 97 |
|
| 98 |
|
| 99 |
#if st.session_state.api_key:
|