Text Classification
Transformers
English
prompting
zero-shot
few-shot
football
sentiment
adaptive-retrieval
Instructions to use kevinkyi/Homework2_Multishot_Prompting with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kevinkyi/Homework2_Multishot_Prompting with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="kevinkyi/Homework2_Multishot_Prompting")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("kevinkyi/Homework2_Multishot_Prompting", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Add few_shot_template.txt
Browse files
prompts/few_shot_template.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are a sentiment classifier for short football news.
|
| 2 |
+
Label mapping: 0=negative, 1=positive.
|
| 3 |
+
Use the exemplars below, then classify the new text.
|
| 4 |
+
Return only 0 or 1.
|
| 5 |
+
|
| 6 |
+
Exemplars:
|
| 7 |
+
{exemplars}
|
| 8 |
+
|
| 9 |
+
Now classify:
|
| 10 |
+
Text: "{text}"
|
| 11 |
+
Label:
|