|
--- |
|
license: apache-2.0 |
|
language: |
|
- en |
|
library_name: transformers |
|
--- |
|
# Model Name |
|
|
|
This is a chatbot model trained using a transformer architecture. It can answer questions based on the training data provided. |
|
|
|
## Usage |
|
|
|
```python |
|
from transformers import AutoTokenizer, TFAutoModelForSeq2SeqLM |
|
|
|
tokenizer = AutoTokenizer.from_pretrained("your_username/your_model_name") |
|
model = TFAutoModelForSeq2SeqLM.from_pretrained("your_username/your_model_name") |
|
|
|
def predict(sentence): |
|
inputs = tokenizer(sentence, return_tensors="tf") |
|
outputs = model.generate(inputs["input_ids"]) |
|
return tokenizer.decode(outputs[0], skip_special_tokens=True) |
|
|
|
sentence = "Can exposure to pesticides in food impact cognitive health?" |
|
print(predict(sentence)) |
|
|