Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,6 +20,7 @@ def getResponseFromHF(api, p, qid, uid):
|
|
| 20 |
]
|
| 21 |
})
|
| 22 |
print(response)
|
|
|
|
| 23 |
data = response.json()["data"]
|
| 24 |
if (len(data) == 2):
|
| 25 |
return data[1]
|
|
@@ -31,6 +32,7 @@ def getResponseFromDefault(api, p, qid, uid):
|
|
| 31 |
"uid":uid
|
| 32 |
})
|
| 33 |
print(response)
|
|
|
|
| 34 |
return response.json()["data"]["content"]
|
| 35 |
|
| 36 |
def chat(api, p, qid, uid, history):
|
|
|
|
| 20 |
]
|
| 21 |
})
|
| 22 |
print(response)
|
| 23 |
+
print(response.json())
|
| 24 |
data = response.json()["data"]
|
| 25 |
if (len(data) == 2):
|
| 26 |
return data[1]
|
|
|
|
| 32 |
"uid":uid
|
| 33 |
})
|
| 34 |
print(response)
|
| 35 |
+
print(response.json())
|
| 36 |
return response.json()["data"]["content"]
|
| 37 |
|
| 38 |
def chat(api, p, qid, uid, history):
|