linoyts HF Staff commited on
Commit
287c8a7
·
verified ·
1 Parent(s): 1bf61b0

gradio_client 2.x: hf_token -> token

Browse files
Files changed (2) hide show
  1. __pycache__/app.cpython-310.pyc +0 -0
  2. app.py +1 -1
__pycache__/app.cpython-310.pyc CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
 
app.py CHANGED
@@ -173,7 +173,7 @@ def fetch_embeddings(prompt, negative_prompt, enhance_prompt, seed):
173
  key = (prompt, negative_prompt, bool(enhance_prompt), int(seed) if enhance_prompt else 0)
174
  if key in _emb_cache:
175
  return _emb_cache[key]
176
- client = Client(TEXT_ENCODER_SPACE, hf_token=TOKEN)
177
  emb_file, final_prompt, status = client.predict(
178
  prompt=prompt, negative_prompt=negative_prompt or "", encode_negative=True,
179
  enhance_prompt=enhance_prompt, seed=int(seed), api_name="/encode",
 
173
  key = (prompt, negative_prompt, bool(enhance_prompt), int(seed) if enhance_prompt else 0)
174
  if key in _emb_cache:
175
  return _emb_cache[key]
176
+ client = Client(TEXT_ENCODER_SPACE, token=TOKEN)
177
  emb_file, final_prompt, status = client.predict(
178
  prompt=prompt, negative_prompt=negative_prompt or "", encode_negative=True,
179
  enhance_prompt=enhance_prompt, seed=int(seed), api_name="/encode",