Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,35 +1,36 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
-
library_name: transformers
|
| 4 |
-
pipeline_tag: text2text-generation
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
widget:
|
| 12 |
- text: "answer question: How do I hire an expert?"
|
| 13 |
-
example_title: "Example Query"
|
| 14 |
-
inference:
|
| 15 |
-
parameters:
|
| 16 |
-
max_length: 512
|
| 17 |
---
|
| 18 |
|
| 19 |
-
#
|
| 20 |
|
| 21 |
This model is part of the NEED AI system for service marketplace intelligence.
|
| 22 |
|
| 23 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
```python
|
| 26 |
-
from transformers import
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
| 33 |
print(result)
|
| 34 |
```
|
| 35 |
|
|
@@ -45,26 +46,10 @@ def query(payload):
|
|
| 45 |
response = requests.post(API_URL, headers=headers, json=payload)
|
| 46 |
return response.json()
|
| 47 |
|
| 48 |
-
|
| 49 |
-
print(
|
| 50 |
```
|
| 51 |
|
| 52 |
-
## Model Details
|
| 53 |
-
|
| 54 |
-
- **Pipeline**: text2text-generation
|
| 55 |
-
- **Library**: transformers
|
| 56 |
-
- **Base Model**: Toxic-BERT
|
| 57 |
-
- **Task**: Question Answering
|
| 58 |
-
|
| 59 |
-
## Training
|
| 60 |
-
|
| 61 |
-
Fine-tuned on NEED AI dataset for service marketplace applications.
|
| 62 |
-
|
| 63 |
-
## License
|
| 64 |
-
|
| 65 |
-
MIT License - See repository for details.
|
| 66 |
-
|
| 67 |
## Links
|
| 68 |
-
|
| 69 |
- **GitHub**: https://github.com/Need-Service-App/need-ai-model
|
| 70 |
- **Email**: needserviceapp@gmail.com
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
+
- text-generation
|
| 5 |
+
- transformers
|
| 6 |
+
- need-ai
|
| 7 |
+
- service-marketplace
|
| 8 |
+
pipeline_tag: text2text-generation
|
| 9 |
widget:
|
| 10 |
- text: "answer question: How do I hire an expert?"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# NEED AI - Chat Support
|
| 14 |
|
| 15 |
This model is part of the NEED AI system for service marketplace intelligence.
|
| 16 |
|
| 17 |
+
## Model Details
|
| 18 |
+
- **Task**: text2text-generation
|
| 19 |
+
- **Base Model**: FLAN-T5-Base
|
| 20 |
+
- **Fine-tuned for**: NEED Service App
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
|
| 24 |
```python
|
| 25 |
+
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
| 26 |
|
| 27 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("yogami9/need-chat-support")
|
| 28 |
+
tokenizer = AutoTokenizer.from_pretrained("yogami9/need-chat-support")
|
| 29 |
|
| 30 |
+
input_text = "answer question: How do I hire an expert?"
|
| 31 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
| 32 |
+
outputs = model.generate(**inputs)
|
| 33 |
+
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 34 |
print(result)
|
| 35 |
```
|
| 36 |
|
|
|
|
| 46 |
response = requests.post(API_URL, headers=headers, json=payload)
|
| 47 |
return response.json()
|
| 48 |
|
| 49 |
+
result = query({"inputs": "answer question: How do I hire an expert?"})
|
| 50 |
+
print(result)
|
| 51 |
```
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
## Links
|
|
|
|
| 54 |
- **GitHub**: https://github.com/Need-Service-App/need-ai-model
|
| 55 |
- **Email**: needserviceapp@gmail.com
|