futranbg commited on
Commit
360f04a
1 Parent(s): a68ea86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -3,8 +3,8 @@ import gradio as gr
3
  from huggingface_hub import InferenceClient
4
 
5
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
6
- API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-2-70b-chat-hf"
7
- API_URL_2 = "https://api-inference.huggingface.co/models/codellama/CodeLlama-34b-Instruct-hf"
8
  BOT_NAME = "Assistant"
9
 
10
  STOP_SEQUENCES = ["\nUser:", " User:", "###", "</s>"]
@@ -19,12 +19,12 @@ EXAMPLES = [
19
 
20
  client = InferenceClient(
21
  API_URL,
22
- headers={"Authorization": f"Bearer {HF_TOKEN}"},
23
  )
24
 
25
  client2 = InferenceClient(
26
  API_URL_2,
27
- headers={"Authorization": f"Bearer {HF_TOKEN}"},
28
  )
29
 
30
  def format_prompt(message, history, system_prompt):
 
3
  from huggingface_hub import InferenceClient
4
 
5
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
6
+ API_URL = "meta-llama/Llama-2-70b-chat-hf"
7
+ API_URL_2 = "codellama/CodeLlama-34b-Instruct-hf"
8
  BOT_NAME = "Assistant"
9
 
10
  STOP_SEQUENCES = ["\nUser:", " User:", "###", "</s>"]
 
19
 
20
  client = InferenceClient(
21
  API_URL,
22
+ token=HF_TOKEN,
23
  )
24
 
25
  client2 = InferenceClient(
26
  API_URL_2,
27
+ token=HF_TOKEN,
28
  )
29
 
30
  def format_prompt(message, history, system_prompt):