Fix pipeline_tag for inference API
Browse files
README.md
CHANGED
|
@@ -1,21 +1,35 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
-
-
|
| 5 |
-
- lora
|
| 6 |
- function-calling
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
-
# SNCF
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
-
##
|
| 14 |
|
| 15 |
```python
|
| 16 |
-
from peft import PeftModel
|
| 17 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 18 |
|
| 19 |
-
|
| 20 |
-
model =
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pipeline_tag: text-generation
|
| 3 |
+
library_name: transformers
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
language:
|
| 6 |
+
- fr
|
| 7 |
+
- en
|
| 8 |
tags:
|
| 9 |
+
- llama
|
|
|
|
| 10 |
- function-calling
|
| 11 |
+
- sncf
|
| 12 |
+
- trains
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# SNCF Router Model
|
| 16 |
|
| 17 |
+
Ce modèle est un routeur d'outils intelligent pour la recherche de trains SNCF.
|
| 18 |
|
| 19 |
+
## Usage
|
| 20 |
|
| 21 |
```python
|
|
|
|
| 22 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 23 |
|
| 24 |
+
tokenizer = AutoTokenizer.from_pretrained("Skapersk/sncf")
|
| 25 |
+
model = AutoModelForCausalLM.from_pretrained("Skapersk/sncf")
|
| 26 |
+
|
| 27 |
+
prompt = "J'aimerais aller à Nantes, geoloc: Paris"
|
| 28 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 29 |
+
outputs = model.generate(**inputs, max_new_tokens=200)
|
| 30 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
## API d'inférence
|
| 34 |
+
|
| 35 |
+
Le modèle est compatible avec l'API d'inférence Hugging Face.
|