alvarobartt HF staff commited on
Commit
32958f2
1 Parent(s): e4777d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -3
README.md CHANGED
@@ -165,12 +165,15 @@ Or programatically via the `huggingface_hub` Python client as follows (TGI is fu
165
 
166
  ```python
167
  import os
168
- from huggingface_hub import InferenceClient # Instead of `from openai import OpenAI`
 
169
 
170
- client = InferenceClient(base_url="http://0.0.0.0:8080/v1", api_key=os.getenv("HF_TOKEN", "-")) # Instead of `client = OpenAI(base_url=..., api_key=...)
 
171
 
172
  chat_completion = client.chat.completions.create(
173
- model="hugging-quants/Meta-Llama-3.1-70B-Instruct-AWQ-INT4", # Instead of `model="tgi"`
 
174
  messages=[
175
  {"role": "system", "content": "You are a helpful assistant."},
176
  {"role": "user", "content": "What is Deep Learning?"},
 
165
 
166
  ```python
167
  import os
168
+ # Instead of `from openai import OpenAI`
169
+ from huggingface_hub import InferenceClient
170
 
171
+ # Instead of `client = OpenAI(base_url="http://0.0.0.0:8080/v1", api_key=os.getenv("OPENAI_API_KEY"))`
172
+ client = InferenceClient(base_url="http://0.0.0.0:8080", api_key=os.getenv("HF_TOKEN", "-"))
173
 
174
  chat_completion = client.chat.completions.create(
175
+ # Instead of `model="tgi"`
176
+ model="hugging-quants/Meta-Llama-3.1-70B-Instruct-AWQ-INT4",
177
  messages=[
178
  {"role": "system", "content": "You are a helpful assistant."},
179
  {"role": "user", "content": "What is Deep Learning?"},