Shamima commited on
Commit
019cb59
1 Parent(s): ab224c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -13,7 +13,7 @@ import cohere
13
  import numpy as np
14
  import pandas as pd
15
  import gradio as gr
16
-
17
  from sklearn.metrics.pairwise import cosine_similarity
18
  from annoy import AnnoyIndex
19
  import warnings
@@ -26,7 +26,8 @@ data_df = pd.read_csv('functions_data.csv')
26
  data_df['docstring'].fillna('not specified', inplace=True)
27
 
28
  # Paste your API key here. Remember to not share publicly
29
- api_key = API_KEY
 
30
 
31
  # Create and retrieve a Cohere API key from dashboard.cohere.ai/welcome/register
32
  co = cohere.Client(api_key)
 
13
  import numpy as np
14
  import pandas as pd
15
  import gradio as gr
16
+ import os
17
  from sklearn.metrics.pairwise import cosine_similarity
18
  from annoy import AnnoyIndex
19
  import warnings
 
26
  data_df['docstring'].fillna('not specified', inplace=True)
27
 
28
  # Paste your API key here. Remember to not share publicly
29
+ key = os.environ.get('API_KEY')
30
+ api_key = key
31
 
32
  # Create and retrieve a Cohere API key from dashboard.cohere.ai/welcome/register
33
  co = cohere.Client(api_key)