change code
Browse files
app.py
CHANGED
|
@@ -7,6 +7,9 @@ def predict(message, history):
|
|
| 7 |
data_json = {"role": "user", "content": message}
|
| 8 |
headers = {'Authorization': f'Bearer {dbx_token}'}
|
| 9 |
response = requests.request(method='POST', headers=headers, url=end_point, json=data_json)
|
|
|
|
|
|
|
|
|
|
| 10 |
if response.status_code != 200:
|
| 11 |
raise Exception(f'Request failed with status {response.status_code}, {response.text}')
|
| 12 |
return response.json()
|
|
|
|
| 7 |
data_json = {"role": "user", "content": message}
|
| 8 |
headers = {'Authorization': f'Bearer {dbx_token}'}
|
| 9 |
response = requests.request(method='POST', headers=headers, url=end_point, json=data_json)
|
| 10 |
+
|
| 11 |
+
print(response)
|
| 12 |
+
|
| 13 |
if response.status_code != 200:
|
| 14 |
raise Exception(f'Request failed with status {response.status_code}, {response.text}')
|
| 15 |
return response.json()
|