erinmikail commited on
Commit
e808226
·
verified ·
1 Parent(s): ac9ffd6

update with secrets

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
- import ldclient
4
- from ldclient import LDClient, Context
5
 
6
- # Initialize LaunchDarkly client
7
- ldclient.set_config(Config("LAUNCHDARKLY_SDK_KEY"))
8
- client = ldclient.get()
 
 
9
 
10
  # Function to get the AI model configuration from LaunchDarkly
11
  def get_model_config():
 
1
  import streamlit as st
2
  from transformers import pipeline
3
+ from ldclient import LDClient, Config, Context
4
+ import os
5
 
6
+ # Retrieve the LaunchDarkly SDK key from environment variables
7
+ ld_sdk_key = os.getenv("LAUNCHDARKLY_SDK_KEY")
8
+
9
+ # Initialize LaunchDarkly client with the correct configuration
10
+ ld_client = LDClient(Config(ld_sdk_key))
11
 
12
  # Function to get the AI model configuration from LaunchDarkly
13
  def get_model_config():