|
--- |
|
license: other |
|
datasets: |
|
- gpt3mix/sst2 |
|
language: |
|
- en |
|
- zh |
|
metrics: |
|
- character |
|
library_name: adapter-transformers |
|
--- |
|
git lfs install |
|
git clone https://huggingface.co/spaces/MirageML/dreambooth |
|
|
|
|
|
import os |
|
import requests |
|
|
|
headers={"Authorization": f"Bearer {os.environ['EXHUMAN_API_KEY']}"} |
|
|
|
body = { |
|
'name': 'Elon Musk', |
|
'context': [ |
|
{'turn': 'bot', 'message': 'Good morning!'}, |
|
{'turn': 'user', 'message': 'hi how are you?'} |
|
] |
|
|
|
} |
|
api_endpoint = "https://api.exh.ai/chatbot/v1/get_response" |
|
|
|
res = requests.post(api_endpoint, json=body, headers=headers) |
|
response = res.json()["response"] |
|
print(f"chatbot reply = {response}") |
|
|