Spestly commited on
Commit
7af49e8
·
verified ·
1 Parent(s): b236948

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,8 +19,7 @@ def process_input(image, image_url, prompt, model, hf_token):
19
  raise gr.Error("Invalid Hugging Face token. It should start with 'hf_'")
20
 
21
  client = InferenceClient(
22
- model=model,
23
- token=hf_token,
24
  provider="cohere"
25
  )
26
 
@@ -43,8 +42,9 @@ def process_input(image, image_url, prompt, model, hf_token):
43
 
44
  try:
45
  stream = client.chat.completions.create(
 
46
  messages=messages,
47
- max_tokens=512,
48
  stream=True,
49
  )
50
 
 
19
  raise gr.Error("Invalid Hugging Face token. It should start with 'hf_'")
20
 
21
  client = InferenceClient(
22
+ api_key=hf_token,
 
23
  provider="cohere"
24
  )
25
 
 
42
 
43
  try:
44
  stream = client.chat.completions.create(
45
+ model=model,
46
  messages=messages,
47
+ max_tokens=8000,
48
  stream=True,
49
  )
50