Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,12 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
|
|
|
| 3 |
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Load model directly
|
| 2 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 3 |
|
| 4 |
+
tokenizer = AutoTokenizer.from_pretrained("zfox/finetuning-sentiment-model-3000-samples")
|
| 5 |
+
model = AutoModelForSequenceClassification.from_pretrained("zfox/finetuning-sentiment-model-3000-samples")
|
| 6 |
|
| 7 |
+
# Use a pipeline as a high-level helper
|
| 8 |
+
from transformers import pipeline
|
| 9 |
|
| 10 |
+
nlp = pipeline("text-classification", model="zfox/finetuning-sentiment-model-3000-samples")
|
| 11 |
+
|
| 12 |
+
text = st.text_input('กรุณาถอดรองเท้า')
|