Alejadro Sanchez-Giraldo commited on
Commit
db12616
1 Parent(s): 0a21b81

fix context

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +1 -1
README.md CHANGED
@@ -16,6 +16,6 @@ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-
16
 
17
  ## Run on docker
18
 
19
- docker run -it -p 7860:7860 --platform=linux/amd64 \
20
  -e LAUNCHDARKLY_SDK_KEY="sdk-142d656c-d430-4f8c-b2f1-7275f2ec65ff" \
21
  registry.hf.space/asgface-sentimentai:latest streamlit run app.py
 
16
 
17
  ## Run on docker
18
 
19
+ docker run -it -p 8501:8501 --platform=linux/amd64 \
20
  -e LAUNCHDARKLY_SDK_KEY="sdk-142d656c-d430-4f8c-b2f1-7275f2ec65ff" \
21
  registry.hf.space/asgface-sentimentai:latest streamlit run app.py
app.py CHANGED
@@ -16,7 +16,7 @@ def get_model_config(user_name):
16
 
17
  # Create a context using Context Builder—it can be anything, but for this use case, I’m just defaulting to myself.
18
 
19
- context = Context.builder("context-key-123abc").name(user_name).build()
20
  flag_variation = ld_client.variation(flag_key, context, default={})
21
 
22
  model_id = flag_variation.get("modelID", "distilbert-base-uncased")
 
16
 
17
  # Create a context using Context Builder—it can be anything, but for this use case, I’m just defaulting to myself.
18
 
19
+ context = Context.builder(f"context-key-{user_name}").name(user_name).build()
20
  flag_variation = ld_client.variation(flag_key, context, default={})
21
 
22
  model_id = flag_variation.get("modelID", "distilbert-base-uncased")