steveagi commited on
Commit
17f643b
·
1 Parent(s): d1c021a

fix a bug (redirect)

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -27,10 +27,6 @@ functionality_list = [
27
  space = 'stevez-bbc123'
28
  # space = 'stevez-test-public'
29
 
30
- # url = f'https://{space}.hf.space/run/predict'
31
- # url = f'https://{space}.hf.space/api/predict'
32
- url = f'https://{space}.hf.space'
33
-
34
  def run(hf_token, service, game, functionality, nlp_command):
35
  # reuse hf_token field as json string
36
  token, user_name, redirect, _ = extract(hf_token)
@@ -67,6 +63,11 @@ def run(hf_token, service, game, functionality, nlp_command):
67
  # x2 = json.loads(x.text)
68
  # res = x2['data'][0]
69
  # res2 = json.loads(res)
 
 
 
 
 
70
  client = Client(
71
  url,
72
  hf_token=token,
 
27
  space = 'stevez-bbc123'
28
  # space = 'stevez-test-public'
29
 
 
 
 
 
30
  def run(hf_token, service, game, functionality, nlp_command):
31
  # reuse hf_token field as json string
32
  token, user_name, redirect, _ = extract(hf_token)
 
63
  # x2 = json.loads(x.text)
64
  # res = x2['data'][0]
65
  # res2 = json.loads(res)
66
+
67
+ # url = f'https://{space}.hf.space/run/predict'
68
+ # url = f'https://{space}.hf.space/api/predict'
69
+ url = f'https://{space}.hf.space'
70
+
71
  client = Client(
72
  url,
73
  hf_token=token,