Alejadro Sanchez-Giraldo commited on
Commit
1afabcf
·
1 Parent(s): d0e9a6d
Files changed (3) hide show
  1. app.py +0 -27
  2. requirements.txt +0 -1
  3. start.sh +1 -1
app.py CHANGED
@@ -4,10 +4,6 @@ import gradio as gr
4
  import torch
5
  import uuid
6
  import time
7
- import ldclient
8
-
9
- from ldclient.config import Config
10
- from ldclient import Context
11
  from transformers import AutoTokenizer, AutoModelForCausalLM
12
 
13
 
@@ -38,28 +34,6 @@ def capture_logs(log_body, log_file, uuid_label):
38
  print("CUDA available: ", torch.cuda.is_available())
39
  print("MPS available: ", torch.backends.mps.is_available())
40
 
41
- sdkKey = os.getenv('sdkKEY')
42
-
43
- ldclient.set_config(Config(sdkKey))
44
- client = ldclient.get()
45
-
46
- context = Context.builder("huggie-face") \
47
- .set("application", "deepSeekChatbot") \
48
- .build()
49
-
50
- flag_value = client.variation("themeColors", context, False)
51
- if flag_value:
52
- print("Feature flag on")
53
- theme = gr.themes.Soft(
54
- primary_hue="fuchsia",
55
- neutral_hue="blue",
56
- )
57
- else:
58
- print("Feature flag off")
59
- theme = gr.themes.Soft(
60
- primary_hue="sky",
61
- neutral_hue="slate",
62
- )
63
 
64
  tokenizer = AutoTokenizer.from_pretrained(
65
  "deepseek-ai/deepseek-coder-1.3b-instruct", trust_remote_code=True)
@@ -122,7 +96,6 @@ iface = gr.Interface(
122
  maximum=1.0, step=0.1, value=0.95),
123
  ],
124
  outputs=gr.Textbox(label="Hope it helps!"),
125
- theme=theme,
126
  title="DSChatbot"
127
  )
128
 
 
4
  import torch
5
  import uuid
6
  import time
 
 
 
 
7
  from transformers import AutoTokenizer, AutoModelForCausalLM
8
 
9
 
 
34
  print("CUDA available: ", torch.cuda.is_available())
35
  print("MPS available: ", torch.backends.mps.is_available())
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  tokenizer = AutoTokenizer.from_pretrained(
39
  "deepseek-ai/deepseek-coder-1.3b-instruct", trust_remote_code=True)
 
96
  maximum=1.0, step=0.1, value=0.95),
97
  ],
98
  outputs=gr.Textbox(label="Hope it helps!"),
 
99
  title="DSChatbot"
100
  )
101
 
requirements.txt CHANGED
@@ -6,4 +6,3 @@ minijinja
6
  torch --extra-index-url https://download.pytorch.org/whl/cu118
7
  torchvision
8
  torchaudio
9
- launchdarkly-server-sdk
 
6
  torch --extra-index-url https://download.pytorch.org/whl/cu118
7
  torchvision
8
  torchaudio
 
start.sh CHANGED
@@ -17,4 +17,4 @@ pip install -r requirements.txt
17
 
18
  # Start the app
19
  echo "Launching your Hugging Face app!"
20
- sdkKEY=${sdkKEY} python app.py
 
17
 
18
  # Start the app
19
  echo "Launching your Hugging Face app!"
20
+ python app.py