Baldezo313 commited on
Commit
3519c88
·
verified ·
1 Parent(s): 0e972ea

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -0
README.md CHANGED
@@ -11,4 +11,45 @@ license: mit
11
  short_description: T5 Fine-tuned on SQuAD for Question Generation
12
  ---
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
11
  short_description: T5 Fine-tuned on SQuAD for Question Generation
12
  ---
13
 
14
+ # T5 Fine-tuned on SQuAD for Question Generation
15
+
16
+ Ce modèle T5 a été fine-tuné par Mamadou Balde à partir du modèle `t5-base` pour la génération de réponses à partir d’un contexte et d’une question, en se basant sur un format simplifié de SQuAD.
17
+
18
+ ## 📚 Données
19
+ Je me suis basé sur le dataset Kaggle : [ananthu017/squad-csv-format](https://www.kaggle.com/datasets/ananthu017/squad-csv-format)
20
+
21
+ ## 🛠️ Utilisation
22
+
23
+ Ce Space vous permet de générer des réponses à partir d’un *contexte* et d’une *question*, en utilisant un modèle T5 fine-tuné sur un dataset dérivé de SQuAD.
24
+
25
+ ✅ Modèle utilisé : [`Baldezo313/t5-finetuned-squad-mamadou`](https://huggingface.co/Baldezo313/t5-finetuned-squad-mamadou)
26
+
27
+ * **Exemple**
28
+
29
+ - **Contexte** : `La classification est une tâche supervisée en apprentissage automatique où l’objectif est de prédire une étiquette.`
30
+ - **Question** : `Qu’est-ce que la classification ?`
31
+ - **Réponse générée** : `C’est une tâche supervisée où l’on prédit une étiquette.`
32
+
33
+ ```python
34
+ from transformers import T5ForConditionalGeneration, T5Tokenizer
35
+
36
+ model = T5ForConditionalGeneration.from_pretrained("Baldezo313/t5-finetuned-squad-mamadou")
37
+ tokenizer = T5Tokenizer.from_pretrained("Baldezo313/t5-finetuned-squad-mamadou")
38
+
39
+ context = "Machine learning is a field of artificial intelligence that uses statistical techniques to give computer systems the ability to learn from data."
40
+ question = "What is machine learning?"
41
+
42
+ inputs = tokenizer(context, question, return_tensors="pt", padding="max_length", truncation=True, max_length=512)
43
+ outputs = model.generate(**inputs)
44
+
45
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
46
+ ```
47
+
48
+ ## Auteur
49
+
50
+ 👨‍💻 Mamadou Saidou BALDE
51
+ 📫 Contact : [LinkedIn](https://www.linkedin.com/in/mamadou-saidou-balde-054a69219/)
52
+
53
+
54
+
55
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference