Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- app (1).py +11 -0
- requriments (1).txt +5 -0
app (1).py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Load model directly
|
| 2 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 3 |
+
|
| 4 |
+
tokenizer = AutoTokenizer.from_pretrained("OatNapat/finetuned_yelp")
|
| 5 |
+
model = AutoModelForSequenceClassification.from_pretrained("OatNapat/finetuned_yelp")
|
| 6 |
+
# Use a pipeline as a high-level helper
|
| 7 |
+
from transformers import pipeline
|
| 8 |
+
|
| 9 |
+
nlp = pipeline("text-classification", model="zfox/finetuning-sentiment-model-3000-samples")
|
| 10 |
+
|
| 11 |
+
text = st.text_input('กรุณาถอดรองเท้า')
|
requriments (1).txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch
|
| 2 |
+
transformers
|
| 3 |
+
streamlit
|
| 4 |
+
altair<5
|
| 5 |
+
pandas
|