Kim Adams commited on
Commit
c0f8910
·
1 Parent(s): a56d2cf

moving keys

Browse files
Files changed (4) hide show
  1. .env +3 -0
  2. __pycache__/config.cpython-311.pyc +0 -0
  3. app.py +3 -2
  4. config.py +1 -4
.env ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Do not share your OpenAI API key with anyone! It should remain a secret.
2
+ OPENAI_API_KEY='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'
3
+ ELEVEN_LABS_API_KEY='a29555e78ebf73a171e201e82a6a3885'
__pycache__/config.cpython-311.pyc CHANGED
Binary files a/__pycache__/config.cpython-311.pyc and b/__pycache__/config.cpython-311.pyc differ
 
app.py CHANGED
@@ -3,10 +3,11 @@ import openai, config, os
3
  import requests, base64
4
  import pandas as pd
5
  import numpy as np
 
6
  from io import BytesIO
7
  from openai.embeddings_utils import get_embedding, cosine_similarity
8
 
9
- openai.api_key=config.OPENAI_API_KEY
10
 
11
  # prepare Q&A embeddings dataframe
12
  question_df = pd.read_csv('data/slalom_embeddings.csv')
@@ -49,7 +50,7 @@ def transcribe(audio):
49
  }
50
  }
51
 
52
- r = requests.post(url, headers={'xi-api-key': config.ELEVEN_LABS_API_KEY}, json=data)
53
  r_audio =r.content
54
  audio_io = BytesIO(r_audio)
55
  audio_io.seek(0)
 
3
  import requests, base64
4
  import pandas as pd
5
  import numpy as np
6
+ from huggingface_hub import Repository
7
  from io import BytesIO
8
  from openai.embeddings_utils import get_embedding, cosine_similarity
9
 
10
+ openai.api_key = os.environ.get("OPENAI_API_KEY", None)
11
 
12
  # prepare Q&A embeddings dataframe
13
  question_df = pd.read_csv('data/slalom_embeddings.csv')
 
50
  }
51
  }
52
 
53
+ r = requests.post(url, headers={'xi-api-key': os.environ.get("ELEVEN_LABS_API_KEY", None)}, json=data)
54
  r_audio =r.content
55
  audio_io = BytesIO(r_audio)
56
  audio_io.seek(0)
config.py CHANGED
@@ -1,5 +1,2 @@
1
- OPENAI_API_KEY='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'
2
- ELEVEN_LABS_API_KEY='a29555e78ebf73a171e201e82a6a3885'
3
  ADVISOR_VOICE_ID='JgUrWCoPVQDKAQc6paA0'
4
- ADVISOR_CUSTOM_PROMPT= "You are John Flaherty, Managing Director of Slalom Build Houston. Don't say your an AI language model. Provide statistics to support your answer and edge in little jokes here and there. Keep answers somewhat short."
5
-
 
 
 
1
  ADVISOR_VOICE_ID='JgUrWCoPVQDKAQc6paA0'
2
+ ADVISOR_CUSTOM_PROMPT= "You are John Flaherty, Managing Director of Slalom Build Houston. Don't say your an AI language model. Provide statistics to support your answer and edge in little jokes here and there. Keep answers somewhat short."