Skip to content

Commit

Permalink
removing API keys from nb
Browse files Browse the repository at this point in the history
  • Loading branch information
someshfengde committed Mar 8, 2024
1 parent e03651a commit c295d13
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions evaluation/data_collection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"import os\n",
"from groq import Groq\n",
"from bs4 import BeautifulSoup\n",
"from html.parser import HTMLParser\n"
"from html.parser import HTMLParser\n",
"from dotenv import load_dotenv\n",
"load_dotenv()\n"
]
},
{
Expand All @@ -63,7 +65,7 @@
" Args:\n",
" prompt (str): the prompt for groq completion\n",
" \"\"\"\n",
" groq_API_key = \"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\"\n",
" groq_API_key = os.environ(\"GROQ_API_KEY\")\n",
"\n",
" client = Groq(\n",
" api_key=groq_API_key,\n",
Expand Down Expand Up @@ -181,7 +183,7 @@
"####################### biorxiv_data QA generation #######################\n",
"\n",
"df = pd.read_csv(\"./biorxiv_data_abstract.csv\")\n",
"client = OpenAI(api_key=\"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\")\n",
"client = OpenAI(api_key=os.getenv(\"OPENAPI_KEY\"))\n",
"\n",
"\n",
"def generate_questions(df, client):\n",
Expand Down Expand Up @@ -673,7 +675,7 @@
"\n",
"################ QUESTION ANSWERS GENERATION ################\n",
"\n",
"client = OpenAI(api_key=\"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\")\n",
"client = OpenAI(api_key=os.getenv(\"OPENAPI_KEY\"))\n",
"\n",
"\n",
"def generate_questions(df, client):\n",
Expand Down

0 comments on commit c295d13

Please sign in to comment.