Orawan commited on
Commit
dcb9dbe
·
1 Parent(s): a789537

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -1,5 +1,12 @@
1
- import gradio as gr
 
2
 
 
 
3
 
 
 
4
 
5
- input_module = gr.inputs.Image(label = "Input Image",image_mode="L",shape=(28,28))
 
 
 
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('กรุณาถอดรองเท้า')