Elfe commited on
Commit
78c0efe
1 Parent(s): f682c55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -18,9 +18,9 @@ def getResponseFromHF(api, p, qid, uid):
18
  qid,
19
  uid,
20
  ]
21
- }).json()
22
  print(response)
23
- data = response["data"]
24
  if (len(data) == 2):
25
  return data[1]
26
 
@@ -29,10 +29,9 @@ def getResponseFromDefault(api, p, qid, uid):
29
  "p":p,
30
  "qid":qid,
31
  "uid":uid
32
- }).json()
33
  print(response)
34
- data = response["data"]
35
- return data["content"]
36
 
37
  def chat(api, p, qid, uid, history):
38
  history = history or []
 
18
  qid,
19
  uid,
20
  ]
21
+ })
22
  print(response)
23
+ data = response.json()["data"]
24
  if (len(data) == 2):
25
  return data[1]
26
 
 
29
  "p":p,
30
  "qid":qid,
31
  "uid":uid
32
+ })
33
  print(response)
34
+ return response.json()["data"]["content"]
 
35
 
36
  def chat(api, p, qid, uid, history):
37
  history = history or []