aniket commited on
Commit
8abba98
1 Parent(s): 6779581

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
2
+
3
+ from chitra.serve.app import GradioApp
4
+
5
+ tokenizer = AutoTokenizer.from_pretrained(
6
+ "finiteautomata/beto-sentiment-analysis")
7
+ model = AutoModelForSequenceClassification.from_pretrained(
8
+ "finiteautomata/beto-sentiment-analysis")
9
+ classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
10
+
11
+
12
+ app = GradioApp(
13
+ "text-classification",
14
+ model=classifier,
15
+ )
16
+ app.run()