harp-dev commited on
Commit
ea275c3
·
verified ·
1 Parent(s): 46042b6

Take the gradio_client token argument from the installed signature

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  2. requirements.txt +0 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  from __future__ import annotations
2
 
 
3
  import os
4
  import time
5
  import urllib.request
@@ -28,7 +29,7 @@ def _backend_client():
28
  global _client
29
  if _client is None:
30
  _token = os.environ.get(_BACKEND_TOKEN_ENV) or None
31
- _client = Client(_BACKEND_SPACE, hf_token=_token)
32
  return _client
33
 
34
 
@@ -42,7 +43,7 @@ def _reset_client():
42
  def _make_conn(tok):
43
  tok = (tok or '').strip()
44
  if tok:
45
- return Client(_BACKEND_SPACE, hf_token=tok)
46
  return _backend_client()
47
 
48
 
 
1
  from __future__ import annotations
2
 
3
+ import inspect
4
  import os
5
  import time
6
  import urllib.request
 
29
  global _client
30
  if _client is None:
31
  _token = os.environ.get(_BACKEND_TOKEN_ENV) or None
32
+ _client = _backend_client(_BACKEND_SPACE, _token)
33
  return _client
34
 
35
 
 
43
  def _make_conn(tok):
44
  tok = (tok or '').strip()
45
  if tok:
46
+ return _backend_client(_BACKEND_SPACE, tok)
47
  return _backend_client()
48
 
49
 
requirements.txt CHANGED
@@ -1,3 +1,2 @@
1
  git+https://github.com/TEAMuP-dev/pyharp.git@v0.4.0
2
- gradio_client
3
  spaces>=0.51.1
 
1
  git+https://github.com/TEAMuP-dev/pyharp.git@v0.4.0
 
2
  spaces>=0.51.1